File tree Expand file tree Collapse file tree 2 files changed +13
-1
lines changed
include/eigenpy/decompositions/sparse Expand file tree Collapse file tree 2 files changed +13
-1
lines changed Original file line number Diff line number Diff line change @@ -98,8 +98,14 @@ struct SparseLUVisitor : public boost::python::def_visitor<
9898
9999 typedef typename Solver::SCMatrix SCMatrix;
100100 typedef typename MatrixType::StorageIndex StorageIndex;
101+
102+ #if EIGEN_VERSION_AT_LEAST(3, 4, 90)
103+ typedef Eigen::Map<Eigen::SparseMatrix<Scalar, Eigen::ColMajor, StorageIndex>>
104+ MappedSparseMatrix;
105+ #else
101106 typedef Eigen::MappedSparseMatrix<Scalar, Eigen::ColMajor, StorageIndex>
102107 MappedSparseMatrix;
108+ #endif
103109 typedef Eigen::SparseLUMatrixLReturnType<SCMatrix> LType;
104110 typedef Eigen::SparseLUMatrixUReturnType<SCMatrix, MappedSparseMatrix> UType;
105111
Original file line number Diff line number Diff line change @@ -15,8 +15,14 @@ void exposeSparseLUSolver() {
1515
1616 typedef typename SparseLUType::Scalar Scalar;
1717 typedef typename SparseLUType::SCMatrix SCMatrix;
18- typedef Eigen::MappedSparseMatrix<Scalar, ColMajor, StorageIndex>
18+
19+ #if EIGEN_VERSION_AT_LEAST(3, 4, 90)
20+ typedef Eigen::Map<Eigen::SparseMatrix<Scalar, Eigen::ColMajor, StorageIndex>>
21+ MappedSparseMatrix;
22+ #else
23+ typedef Eigen::MappedSparseMatrix<Scalar, Eigen::ColMajor, StorageIndex>
1924 MappedSparseMatrix;
25+ #endif
2026
2127 SparseLUMatrixLReturnTypeVisitor<SCMatrix>::expose (
2228 (" SparseLUMatrixLReturnType" ));
You can’t perform that action at this time.
0 commit comments