18 AccelerateImplVisitor<AccelerateDerived>> {
19 typedef AccelerateDerived Solver;
21 typedef typename AccelerateDerived::MatrixType MatrixType;
22 typedef typename MatrixType::Scalar Scalar;
23 typedef typename MatrixType::RealScalar RealScalar;
24 typedef MatrixType CholMatrixType;
25 typedef typename MatrixType::StorageIndex StorageIndex;
27 template <
class PyClass>
28 void visit(PyClass &cl)
const {
31 .def(
"analyzePattern", &Solver::analyzePattern,
32 bp::args(
"self",
"matrix"),
33 "Performs a symbolic decomposition on the sparcity of matrix.\n" 34 "This function is particularly useful when solving for several " 35 "problems having the same structure.")
41 (Solver & (Solver::*)(
const MatrixType &matrix)) & Solver::compute,
42 bp::args(
"self",
"matrix"),
43 "Computes the sparse Cholesky decomposition of a given matrix.",
46 .def(
"factorize", &Solver::factorize, bp::args(
"self",
"matrix"),
47 "Performs a numeric decomposition of a given matrix.\n" 48 "The given matrix must has the same sparcity than the matrix on " 49 "which the symbolic decomposition has been performed.\n" 50 "See also analyzePattern().")
52 .def(
"info", &Solver::info, bp::arg(
"self"),
53 "NumericalIssue if the input contains INF or NaN values or " 54 "overflow occured. Returns Success otherwise.")
56 .def(
"setOrder", &Solver::setOrder, bp::arg(
"self"),
"Set order");
59 static void expose(
const std::string &name,
const std::string &doc =
"") {
60 bp::class_<Solver, boost::noncopyable>(name.c_str(), doc.c_str(),
64 .def(bp::init<>(bp::arg(
"self"),
"Default constructor"))
65 .def(bp::init<MatrixType>(bp::args(
"self",
"matrix"),
66 "Constructs and performs the " 67 "factorization from a given matrix."));