18 :
public boost::python::def_visitor<CholmodBaseVisitor<CholdmodDerived>> {
19 typedef CholdmodDerived Solver;
21 typedef typename CholdmodDerived::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 {
29 cl.def(
"analyzePattern", &Solver::analyzePattern,
30 bp::args(
"self",
"matrix"),
31 "Performs a symbolic decomposition on the sparcity of matrix.\n" 32 "This function is particularly useful when solving for several " 33 "problems having the same structure.")
39 (Solver & (Solver::*)(
const MatrixType &matrix)) & Solver::compute,
40 bp::args(
"self",
"matrix"),
41 "Computes the sparse Cholesky decomposition of a given matrix.",
44 .def(
"determinant", &Solver::determinant, bp::arg(
"self"),
45 "Returns the determinant of the underlying matrix from the " 46 "current factorization.")
48 .def(
"factorize", &Solver::factorize, bp::args(
"self",
"matrix"),
49 "Performs a numeric decomposition of a given matrix.\n" 50 "The given matrix must has the same sparcity than the matrix on " 51 "which the symbolic decomposition has been performed.\n" 52 "See also analyzePattern().")
54 .def(
"info", &Solver::info, bp::arg(
"self"),
55 "NumericalIssue if the input contains INF or NaN values or " 56 "overflow occured. Returns Success otherwise.")
58 .def(
"logDeterminant", &Solver::logDeterminant, bp::arg(
"self"),
59 "Returns the log determinant of the underlying matrix from the " 60 "current factorization.")
62 .def(
"setShift", &Solver::setShift, (bp::args(
"self",
"offset")),
63 "Sets the shift parameters that will be used to adjust the " 64 "diagonal coefficients during the numerical factorization.\n" 65 "During the numerical factorization, the diagonal coefficients " 66 "are transformed by the following linear model: d_ii = offset + " 68 "The default is the identity transformation with offset=0.",