Skip to content

Commit e06fa82

Browse files
committed
decompositions: fix issue with former version of Eigen
1 parent 21f4ebf commit e06fa82

File tree

2 files changed

+9
-3
lines changed

2 files changed

+9
-3
lines changed

include/eigenpy/decompositions/LDLT.hpp

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,10 +56,12 @@ namespace eigenpy
5656

5757
.def("rankUpdate",(Solver (Solver::*)(const VectorType &, const RealScalar &))&Solver::template rankUpdate<VectorType>,
5858
bp::args("self","vector","sigma"))
59-
59+
60+
#if EIGEN_VERSION_AT_LEAST(3,2,90)
6061
.def("adjoint",&Solver::adjoint,bp::arg("self"),
6162
"Returns the adjoint, that is, a reference to the decomposition itself as if the underlying matrix is self-adjoint.",
6263
bp::return_value_policy<bp::reference_existing_object>())
64+
#endif
6365

6466
.def("compute",(Solver & (Solver::*)(const Eigen::EigenBase<MatrixType> & matrix))&Solver::compute,
6567
bp::args("self","matrix"),
@@ -68,9 +70,10 @@ namespace eigenpy
6870

6971
.def("info",&Solver::info,bp::arg("self"),
7072
"NumericalIssue if the input contains INF or NaN values or overflow occured. Returns Success otherwise.")
71-
73+
#if EIGEN_VERSION_AT_LEAST(3,2,90)
7274
.def("rcond",&Solver::rcond,bp::arg("self"),
7375
"Returns an estimate of the reciprocal condition number of the matrix.")
76+
#endif
7477
.def("reconstructedMatrix",&Solver::reconstructedMatrix,bp::arg("self"),
7578
"Returns the matrix represented by the decomposition, i.e., it returns the product: L L^*. This function is provided for debug purpose.")
7679
.def("solve",&solve<VectorType>,bp::args("self","b"),

include/eigenpy/decompositions/LLT.hpp

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,9 +47,11 @@ namespace eigenpy
4747
.def("rankUpdate",(Solver (Solver::*)(const VectorType &, const RealScalar &))&Solver::template rankUpdate<VectorType>,
4848
bp::args("self","vector","sigma"))
4949

50+
#if EIGEN_VERSION_AT_LEAST(3,2,90)
5051
.def("adjoint",&Solver::adjoint,bp::arg("self"),
5152
"Returns the adjoint, that is, a reference to the decomposition itself as if the underlying matrix is self-adjoint.",
5253
bp::return_value_policy<bp::reference_existing_object>())
54+
#endif
5355

5456
.def("compute",(Solver & (Solver::*)(const Eigen::EigenBase<MatrixType> & matrix))&Solver::compute,
5557
bp::args("self","matrix"),
@@ -58,9 +60,10 @@ namespace eigenpy
5860

5961
.def("info",&Solver::info,bp::arg("self"),
6062
"NumericalIssue if the input contains INF or NaN values or overflow occured. Returns Success otherwise.")
61-
63+
#if EIGEN_VERSION_AT_LEAST(3,2,90)
6264
.def("rcond",&Solver::rcond,bp::arg("self"),
6365
"Returns an estimate of the reciprocal condition number of the matrix.")
66+
#endif
6467
.def("reconstructedMatrix",&Solver::reconstructedMatrix,bp::arg("self"),
6568
"Returns the matrix represented by the decomposition, i.e., it returns the product: L L^*. This function is provided for debug purpose.")
6669
.def("solve",&solve<VectorType>,bp::args("self","b"),

0 commit comments

Comments
 (0)