diff --git a/gtsam/linear/GaussianFactorGraph.cpp b/gtsam/linear/GaussianFactorGraph.cpp index 69890c32d..9a22d6111 100644 --- a/gtsam/linear/GaussianFactorGraph.cpp +++ b/gtsam/linear/GaussianFactorGraph.cpp @@ -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); } } diff --git a/gtsam/linear/SparseEigen.h b/gtsam/linear/SparseEigen.h index 9df74f9fc..eac4178aa 100644 --- a/gtsam/linear/SparseEigen.h +++ b/gtsam/linear/SparseEigen.h @@ -30,7 +30,9 @@ namespace gtsam { -typedef Eigen::SparseMatrix SparseEigen; +/// Eigen-format sparse matrix. Note: ColMajor is ~20% faster since +/// InnerIndices must be sorted +typedef Eigen::SparseMatrix SparseEigen; /// Constructs an Eigen-format SparseMatrix of a GaussianFactorGraph SparseEigen sparseJacobianEigen(