.. _program_listing_file__tmp_ws_src_eigenpy_include_eigenpy_decompositions_sparse_cholmod_CholmodBase.hpp: Program Listing for File CholmodBase.hpp ======================================== |exhale_lsh| :ref:`Return to documentation for file ` (``/tmp/ws/src/eigenpy/include/eigenpy/decompositions/sparse/cholmod/CholmodBase.hpp``) .. |exhale_lsh| unicode:: U+021B0 .. UPWARDS ARROW WITH TIP LEFTWARDS .. code-block:: cpp /* * Copyright 2024 INRIA */ #ifndef __eigenpy_decomposition_sparse_cholmod_cholmod_base_hpp__ #define __eigenpy_decomposition_sparse_cholmod_cholmod_base_hpp__ #include "eigenpy/eigenpy.hpp" #include "eigenpy/eigen/EigenBase.hpp" #include "eigenpy/decompositions/sparse/SparseSolverBase.hpp" #include namespace eigenpy { template struct CholmodBaseVisitor : public boost::python::def_visitor > { typedef CholdmodDerived Solver; typedef typename CholdmodDerived::MatrixType MatrixType; typedef typename MatrixType::Scalar Scalar; typedef typename MatrixType::RealScalar RealScalar; typedef MatrixType CholMatrixType; typedef typename MatrixType::StorageIndex StorageIndex; template void visit(PyClass &cl) const { cl.def("analyzePattern", &Solver::analyzePattern, bp::args("self", "matrix"), "Performs a symbolic decomposition on the sparcity of matrix.\n" "This function is particularly useful when solving for several " "problems having the same structure.") .def(EigenBaseVisitor()) .def(SparseSolverBaseVisitor()) .def("compute", (Solver & (Solver::*)(const MatrixType &matrix)) & Solver::compute, bp::args("self", "matrix"), "Computes the sparse Cholesky decomposition of a given matrix.", bp::return_self<>()) .def("determinant", &Solver::determinant, bp::arg("self"), "Returns the determinant of the underlying matrix from the " "current factorization.") .def("factorize", &Solver::factorize, bp::args("self", "matrix"), "Performs a numeric decomposition of a given matrix.\n" "The given matrix must has the same sparcity than the matrix on " "which the symbolic decomposition has been performed.\n" "See also analyzePattern().") .def("info", &Solver::info, bp::arg("self"), "NumericalIssue if the input contains INF or NaN values or " "overflow occured. Returns Success otherwise.") .def("logDeterminant", &Solver::logDeterminant, bp::arg("self"), "Returns the log determinant of the underlying matrix from the " "current factorization.") .def("setShift", &Solver::setShift, (bp::args("self", "offset")), "Sets the shift parameters that will be used to adjust the " "diagonal coefficients during the numerical factorization.\n" "During the numerical factorization, the diagonal coefficients " "are transformed by the following linear model: d_ii = offset + " "d_ii.\n" "The default is the identity transformation with offset=0.", bp::return_self<>()); } }; } // namespace eigenpy #endif // ifndef __eigenpy_decomposition_sparse_cholmod_cholmod_base_hpp__