29#include <Eigen/Sparse>
35typedef Eigen::SparseMatrix<double, Eigen::ColMajor, int>
SparseEigen;
40 gttic_(SparseEigen_sparseJacobianEigen);
49 std::vector<int> nnz(ncols, 0);
50 for (
const auto &entry : entries) nnz[std::get<1>(entry)]++;
53 for (
const auto &entry : entries)
54 Ab.insert(std::get<0>(entry), std::get<1>(entry)) = std::get<2>(entry);
59 gttic_(SparseEigen_sparseJacobianEigen_defaultOrdering);
Linear Factor Graph where all factors are Gaussians.
Global functions in a separate testing namespace.
Definition: chartTesting.h:28
Eigen::SparseMatrix< double, Eigen::ColMajor, int > SparseEigen
Eigen-format sparse matrix.
Definition: SparseEigen.h:35
SparseEigen sparseJacobianEigen(const GaussianFactorGraph &gfg, const Ordering &ordering)
Constructs an Eigen-format SparseMatrix of a GaussianFactorGraph.
Definition: SparseEigen.h:38
Definition: Ordering.h:34
A Linear Factor Graph is a factor graph where all factors are Gaussian, i.e.
Definition: GaussianFactorGraph.h:69
std::vector< std::tuple< int, int, double > > sparseJacobian(const Ordering &ordering, size_t &nrows, size_t &ncols) const
Returns a sparse augmented Jacbian matrix as a vector of i, j, and s, where i(k) and j(k) are the bas...
Definition: GaussianFactorGraph.cpp:103