minor efficiency modifications
parent
77c65f8176
commit
ada83d92dc
|
@ -154,7 +154,7 @@ namespace gtsam {
|
||||||
for (size_t j = 0; j < (size_t) whitenedA.cols(); j++) {
|
for (size_t j = 0; j < (size_t) whitenedA.cols(); j++) {
|
||||||
double s = whitenedA(i, j);
|
double s = whitenedA(i, j);
|
||||||
if (std::abs(s) > 1e-12)
|
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 {
|
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
|
/// Constructs an Eigen-format SparseMatrix of a GaussianFactorGraph
|
||||||
SparseEigen sparseJacobianEigen(
|
SparseEigen sparseJacobianEigen(
|
||||||
|
|
Loading…
Reference in New Issue