CholmodBase.hpp
Go to the documentation of this file.
1 /*
2  * Copyright 2024 INRIA
3  */
4 
5 #ifndef __eigenpy_decomposition_sparse_cholmod_cholmod_base_hpp__
6 #define __eigenpy_decomposition_sparse_cholmod_cholmod_base_hpp__
7 
8 #include "eigenpy/eigenpy.hpp"
11 
12 #include <Eigen/CholmodSupport>
13 
14 namespace eigenpy {
15 
16 template <typename CholdmodDerived>
18  : public boost::python::def_visitor<CholmodBaseVisitor<CholdmodDerived> > {
19  typedef CholdmodDerived Solver;
20 
21  typedef typename CholdmodDerived::MatrixType MatrixType;
22  typedef typename MatrixType::Scalar Scalar;
23  typedef typename MatrixType::RealScalar RealScalar;
25  typedef typename MatrixType::StorageIndex StorageIndex;
26 
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.")
34 
37 
38  .def("compute",
39  (Solver & (Solver::*)(const MatrixType &matrix)) & Solver::compute,
40  bp::args("self", "matrix"),
41  "Computes the sparse Cholesky decomposition of a given matrix.",
42  bp::return_self<>())
43 
44  .def("determinant", &Solver::determinant, bp::arg("self"),
45  "Returns the determinant of the underlying matrix from the "
46  "current factorization.")
47 
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().")
53 
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.")
57 
58  .def("logDeterminant", &Solver::logDeterminant, bp::arg("self"),
59  "Returns the log determinant of the underlying matrix from the "
60  "current factorization.")
61 
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 + "
67  "d_ii.\n"
68  "The default is the identity transformation with offset=0.",
69  bp::return_self<>());
70  }
71 };
72 
73 } // namespace eigenpy
74 
75 #endif // ifndef __eigenpy_decomposition_sparse_cholmod_cholmod_base_hpp__
eigenpy::SparseSolverBaseVisitor
Definition: decompositions/sparse/SparseSolverBase.hpp:16
eigenpy::CholmodBaseVisitor::CholMatrixType
MatrixType CholMatrixType
Definition: CholmodBase.hpp:24
eigenpy::CholmodBaseVisitor::RealScalar
MatrixType::RealScalar RealScalar
Definition: CholmodBase.hpp:23
eigenpy
Definition: alignment.hpp:14
eigenpy::EigenBaseVisitor
Definition: EigenBase.hpp:13
eigenpy::CholmodBaseVisitor::StorageIndex
MatrixType::StorageIndex StorageIndex
Definition: CholmodBase.hpp:25
eigenpy.hpp
eigenpy::CholmodBaseVisitor::visit
void visit(PyClass &cl) const
Definition: CholmodBase.hpp:28
eigenpy::CholmodBaseVisitor::Scalar
MatrixType::Scalar Scalar
Definition: CholmodBase.hpp:22
eigenpy::CholmodBaseVisitor::Solver
CholdmodDerived Solver
Definition: CholmodBase.hpp:19
SparseSolverBase.hpp
EigenBase.hpp
eigenpy::CholmodBaseVisitor::MatrixType
CholdmodDerived::MatrixType MatrixType
Definition: CholmodBase.hpp:21
eigenpy::CholmodBaseVisitor
Definition: CholmodBase.hpp:17


eigenpy
Author(s): Justin Carpentier, Nicolas Mansard
autogenerated on Sat Nov 2 2024 02:14:45