5 #ifndef __eigenpy_decompositions_sparse_ldlt_hpp__
6 #define __eigenpy_decompositions_sparse_ldlt_hpp__
14 template <
typename _MatrixType,
int _UpLo = Eigen::Lower,
16 Eigen::AMDOrdering<typename _MatrixType::StorageIndex> >
18 :
public boost::python::def_visitor<
19 SimplicialLDLTVisitor<_MatrixType, _UpLo, _Ordering> > {
23 typedef Eigen::SimplicialLDLT<MatrixType>
Solver;
24 typedef typename MatrixType::Scalar
Scalar;
26 typedef Eigen::Matrix<Scalar, Eigen::Dynamic, 1, MatrixType::Options>
28 typedef Eigen::Matrix<
Scalar, Eigen::Dynamic, Eigen::Dynamic,
32 template <
class PyClass>
34 cl.def(bp::init<>(bp::arg(
"self"),
"Default constructor"))
35 .def(bp::init<MatrixType>(bp::args(
"self",
"matrix"),
36 "Constructs and performs the LDLT "
37 "factorization from a given matrix."))
39 .def(
"vectorD", &
vectorD, bp::arg(
"self"),
40 "Returns the diagonal vector D.")
45 static const std::string classname =
51 bp::class_<Solver, boost::noncopyable>(
53 "A direct sparse LDLT Cholesky factorizations.\n\n"
54 "This class provides a LDL^T Cholesky factorizations of sparse "
55 "matrices that are selfadjoint and positive definite."
56 "The factorization allows for solving A.X = B where X and B can be "
57 "either dense or sparse.\n\n"
58 "In order to reduce the fill-in, a symmetric permutation P is applied "
59 "prior to the factorization such that the factorized matrix is P A "
72 #endif // ifndef __eigenpy_decompositions_sparse_ldlt_hpp__