29 #include <Eigen/Sparse> 40 gttic_(SparseEigen_sparseJacobianEigen);
46 SparseEigen
Ab(nrows, ncols);
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);
A versatible sparse matrix representation.
static enum @843 ordering
Eigen::SparseMatrix< double, Eigen::ColMajor, int > SparseEigen
SparseEigen sparseJacobianEigen(const GaussianFactorGraph &gfg, const Ordering &ordering)
Constructs an Eigen-format SparseMatrix of a GaussianFactorGraph.
Scalar & insert(Index row, Index col)
Linear Factor Graph where all factors are Gaussians.
std::vector< std::tuple< int, int, double > > sparseJacobian(const Ordering &ordering, size_t &nrows, size_t &ncols) const
void reserve(Index reserveSize)