rename matrix type from `SpMat` to `SparseEigen`
parent
d9c03aa827
commit
d8491b27fb
|
|
@ -30,10 +30,10 @@
|
||||||
|
|
||||||
namespace gtsam {
|
namespace gtsam {
|
||||||
|
|
||||||
typedef Eigen::SparseMatrix<double> SpMat;
|
typedef Eigen::SparseMatrix<double> SparseEigen;
|
||||||
|
|
||||||
/// Constructs an Eigen-format SparseMatrix of a GaussianFactorGraph
|
/// Constructs an Eigen-format SparseMatrix of a GaussianFactorGraph
|
||||||
SpMat sparseJacobianEigen(
|
SparseEigen sparseJacobianEigen(
|
||||||
const GaussianFactorGraph &gfg, const Ordering &ordering) {
|
const GaussianFactorGraph &gfg, const Ordering &ordering) {
|
||||||
// TODO(gerry): eliminate copy/pasta by making GaussianFactorGraph version
|
// TODO(gerry): eliminate copy/pasta by making GaussianFactorGraph version
|
||||||
// more general, or by creating an Eigen::Triplet compatible wrapper for
|
// more general, or by creating an Eigen::Triplet compatible wrapper for
|
||||||
|
|
@ -107,12 +107,12 @@ SpMat sparseJacobianEigen(
|
||||||
}
|
}
|
||||||
|
|
||||||
// ...and make a sparse matrix with it.
|
// ...and make a sparse matrix with it.
|
||||||
SpMat Ab(row, currentColIndex + 1);
|
SparseEigen Ab(row, currentColIndex + 1);
|
||||||
Ab.setFromTriplets(entries.begin(), entries.end());
|
Ab.setFromTriplets(entries.begin(), entries.end());
|
||||||
return Ab;
|
return Ab;
|
||||||
}
|
}
|
||||||
|
|
||||||
SpMat sparseJacobianEigen(const GaussianFactorGraph &gfg) {
|
SparseEigen sparseJacobianEigen(const GaussianFactorGraph &gfg) {
|
||||||
return sparseJacobianEigen(gfg, Ordering(gfg.keys()));
|
return sparseJacobianEigen(gfg, Ordering(gfg.keys()));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue