.. _program_listing_file__tmp_ws_src_eigenpy_include_eigenpy_decompositions_sparse_LLT.hpp: Program Listing for File LLT.hpp ================================ |exhale_lsh| :ref:`Return to documentation for file ` (``/tmp/ws/src/eigenpy/include/eigenpy/decompositions/sparse/LLT.hpp``) .. |exhale_lsh| unicode:: U+021B0 .. UPWARDS ARROW WITH TIP LEFTWARDS .. code-block:: cpp /* * Copyright 2024 INRIA */ #ifndef __eigenpy_decomposition_sparse_llt_hpp__ #define __eigenpy_decomposition_sparse_llt_hpp__ #include "eigenpy/eigenpy.hpp" #include "eigenpy/decompositions/sparse/SimplicialCholesky.hpp" #include "eigenpy/utils/scalar-name.hpp" namespace eigenpy { template > struct SimplicialLLTVisitor : public boost::python::def_visitor< SimplicialLLTVisitor<_MatrixType, _UpLo, _Ordering> > { typedef SimplicialLLTVisitor<_MatrixType, _UpLo, _Ordering> Visitor; typedef _MatrixType MatrixType; typedef Eigen::SimplicialLLT Solver; typedef typename MatrixType::Scalar Scalar; typedef typename MatrixType::RealScalar RealScalar; typedef Eigen::Matrix DenseVectorXs; typedef Eigen::Matrix DenseMatrixXs; template void visit(PyClass &cl) const { cl.def(bp::init<>(bp::arg("self"), "Default constructor")) .def(bp::init(bp::args("self", "matrix"), "Constructs and performs the LLT " "factorization from a given matrix.")) .def(SimplicialCholeskyVisitor()); } static void expose() { static const std::string classname = "SimplicialLLT_" + scalar_name::shortname(); expose(classname); } static void expose(const std::string &name) { bp::class_( name.c_str(), "A direct sparse LLT Cholesky factorizations.\n\n" "This class provides a LL^T Cholesky factorizations of sparse matrices " "that are selfadjoint and positive definite." "The factorization allows for solving A.X = B where X and B can be " "either dense or sparse.\n\n" "In order to reduce the fill-in, a symmetric permutation P is applied " "prior to the factorization such that the factorized matrix is P A " "P^-1.", bp::no_init) .def(SimplicialLLTVisitor()); } }; } // namespace eigenpy #endif // ifndef __eigenpy_decomposition_sparse_llt_hpp__