Skip to content

Commit 384d24d

Browse files
committed
decompositions: fix call to compute
1 parent 4e7cbeb commit 384d24d

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

include/eigenpy/decompositions/EigenSolver.hpp

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ namespace eigenpy
4141
"Returns the eigenvectors of given matrix.",
4242
bp::return_value_policy<bp::return_by_value>())
4343

44-
.def("compute",(Solver & (Solver::*)(const Eigen::EigenBase<MatrixType> & matrix))&Solver::template compute<MatrixType>,
44+
.def("compute",&EigenSolverVisitor::compute_proxy<MatrixType>,
4545
bp::args("self","matrix"),
4646
"Computes the eigendecomposition of given matrix.",
4747
bp::return_value_policy<bp::reference_existing_object>())
@@ -81,6 +81,14 @@ namespace eigenpy
8181
.def(EigenSolverVisitor());
8282
}
8383

84+
private:
85+
86+
template<typename MatrixType>
87+
static Solver & compute_proxy(Solver & self, const Eigen::EigenBase<MatrixType> & matrix)
88+
{
89+
return self.compute(matrix);
90+
}
91+
8492
};
8593

8694
} // namespace eigenpy

0 commit comments

Comments
 (0)