eigenpy 3.12.0
Bindings between Numpy and Eigen using Boost.Python
Loading...
Searching...
No Matches
CholmodSimplicialLLT.hpp
1/*
2 * Copyright 2024 INRIA
3 */
4
5#ifndef __eigenpy_decomposition_sparse_cholmod_cholmod_simplicial_llt_hpp__
6#define __eigenpy_decomposition_sparse_cholmod_cholmod_simplicial_llt_hpp__
7
8#include "eigenpy/eigenpy.hpp"
9#include "eigenpy/decompositions/sparse/cholmod/CholmodDecomposition.hpp"
10#include "eigenpy/utils/scalar-name.hpp"
11
12namespace eigenpy {
13
14template <typename MatrixType_, int UpLo_ = Eigen::Lower>
16 : public boost::python::def_visitor<
17 CholmodSimplicialLLTVisitor<MatrixType_, UpLo_>> {
18 typedef MatrixType_ MatrixType;
19 typedef typename MatrixType::Scalar Scalar;
20 typedef typename MatrixType::RealScalar RealScalar;
21
22 typedef Eigen::CholmodSimplicialLLT<MatrixType_, UpLo_> Solver;
23
24 template <class PyClass>
25 void visit(PyClass &cl) const {
26 cl
27
29 .def(bp::init<>(bp::arg("self"), "Default constructor"))
30 .def(bp::init<MatrixType>(bp::args("self", "matrix"),
31 "Constructs and performs the LLT "
32 "factorization from a given matrix."))
33
34 ;
35 }
36
37 static void expose() {
38 static const std::string classname =
39 "CholmodSimplicialLLT_" + scalar_name<Scalar>::shortname();
40 expose(classname);
41 }
42
43 static void expose(const std::string &name) {
44 bp::class_<Solver, boost::noncopyable>(
45 name.c_str(),
46 "A simplicial direct Cholesky (LLT) factorization and solver based on "
47 "Cholmod.\n\n"
48 "This class allows to solve for A.X = B sparse linear problems via a "
49 "simplicial LL^T Cholesky factorization using the Cholmod library."
50 "This simplicial variant is equivalent to Eigen's built-in "
51 "SimplicialLLT class."
52 "Therefore, it has little practical interest. The sparse matrix A must "
53 "be selfadjoint and positive definite."
54 "The vectors or matrices X and B can be either dense or sparse.",
55 bp::no_init)
57 }
58};
59
60} // namespace eigenpy
61
62#endif // ifndef
63 // __eigenpy_decomposition_sparse_cholmod_cholmod_simplicial_llt_hpp__
void expose()
Call the expose function of a given type T.
Definition expose.hpp:23