minor efficiency modifications
parent
77c65f8176
commit
ada83d92dc
|
@ -154,7 +154,7 @@ namespace gtsam {
|
|||
for (size_t j = 0; j < (size_t) whitenedA.cols(); j++) {
|
||||
double s = whitenedA(i, j);
|
||||
if (std::abs(s) > 1e-12)
|
||||
entries.push_back(boost::make_tuple(row + i, column_start + j, s));
|
||||
entries.emplace_back(row + i, column_start + j, s);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -30,7 +30,9 @@
|
|||
|
||||
namespace gtsam {
|
||||
|
||||
typedef Eigen::SparseMatrix<double> SparseEigen;
|
||||
/// Eigen-format sparse matrix. Note: ColMajor is ~20% faster since
|
||||
/// InnerIndices must be sorted
|
||||
typedef Eigen::SparseMatrix<double, Eigen::ColMajor> SparseEigen;
|
||||
|
||||
/// Constructs an Eigen-format SparseMatrix of a GaussianFactorGraph
|
||||
SparseEigen sparseJacobianEigen(
|
||||
|
|
Loading…
Reference in New Issue