17 :
public boost::python::def_visitor<
18 SparseSolverBaseVisitor<SimplicialDerived>> {
19 typedef SimplicialDerived Solver;
21 typedef typename SimplicialDerived::MatrixType MatrixType;
22 typedef typename MatrixType::Scalar Scalar;
23 typedef typename MatrixType::RealScalar RealScalar;
25 typedef Eigen::Matrix<Scalar, Eigen::Dynamic, 1, MatrixType::Options>
27 typedef Eigen::Matrix<Scalar, Eigen::Dynamic, Eigen::Dynamic,
31 template <
class PyClass>
32 void visit(PyClass &cl)
const {
33 cl.def(
"solve", &solve<DenseVectorXs>, bp::args(
"self",
"b"),
34 "Returns the solution x of A x = b using the current " 35 "decomposition of A.")
36 .def(
"solve", &solve<DenseMatrixXs>, bp::args(
"self",
"B"),
37 "Returns the solution X of A X = B using the current " 38 "decomposition of A where B is a right hand side matrix.")
40 .def(
"solve", &solve<MatrixType>, bp::args(
"self",
"B"),
41 "Returns the solution X of A X = B using the current " 42 "decomposition of A where B is a right hand side matrix.");
46 template <
typename MatrixOrVector>
47 static MatrixOrVector solve(
const Solver &self,
const MatrixOrVector &vec) {
48 return self.solve(vec);