g2o
Loading...
Searching...
No Matches
g2o::LinearSolverCholmodOnline< MatrixType > Class Template Reference

linear solver which allows to update the cholesky factor More...

#include <linear_solver_cholmod_online.h>

Inheritance diagram for g2o::LinearSolverCholmodOnline< MatrixType >:
Collaboration diagram for g2o::LinearSolverCholmodOnline< MatrixType >:

Public Member Functions

 LinearSolverCholmodOnline ()
virtual ~LinearSolverCholmodOnline ()
virtual bool init ()
bool solve (const SparseBlockMatrix< MatrixType > &A, double *x, double *b)
bool blockOrdering () const
cholmod_factor * L () const
size_t nonZerosInL () const
int choleskyUpdate (cholmod_sparse *update)
bool solve (double *x, double *b)
void computeSymbolicDecomposition (const SparseBlockMatrix< MatrixType > &A)
void fillCholmodExt (const SparseBlockMatrix< MatrixType > &A, bool onlyValues)
Public Member Functions inherited from g2o::LinearSolver< MatrixType >
 LinearSolver ()
virtual ~LinearSolver ()
virtual bool solveBlocks (double **&blocks, const SparseBlockMatrix< MatrixType > &A)
virtual bool solvePattern (SparseBlockMatrix< MatrixX > &spinv, const std::vector< std::pair< int, int > > &blockIndices, const SparseBlockMatrix< MatrixType > &A)
bool writeDebug () const
 write a debug dump of the system matrix if it is not PSD in solve
void setWriteDebug (bool b)
Public Member Functions inherited from g2o::LinearSolverCholmodOnlineInterface
 LinearSolverCholmodOnlineInterface ()

Protected Attributes

cholmod_common _cholmodCommon
cholmod::CholmodExt * _cholmodSparse
cholmod_factor * _cholmodFactor
bool _blockOrdering
MatrixStructure _matrixStructure
Eigen::VectorXi _scalarPermutation
Eigen::VectorXi _blockPermutation
Protected Attributes inherited from g2o::LinearSolver< MatrixType >
bool _writeDebug

Additional Inherited Members

Static Public Member Functions inherited from g2o::LinearSolver< MatrixType >
static void allocateBlocks (const SparseBlockMatrix< MatrixType > &A, double **&blocks)
 allocate block memory structure
static void deallocateBlocks (const SparseBlockMatrix< MatrixType > &A, double **&blocks)
 de-allocate the block structure
template<typename BlockDerived, typename ScalarDerived>
static void blockToScalarPermutation (const SparseBlockMatrix< MatrixType > &A, const Eigen::MatrixBase< BlockDerived > &p, const Eigen::MatrixBase< ScalarDerived > &scalar)
Public Attributes inherited from g2o::LinearSolverCholmodOnlineInterface
Eigen::VectorXi * cmember
int batchEveryN

Detailed Description

template<typename MatrixType>
class g2o::LinearSolverCholmodOnline< MatrixType >

linear solver which allows to update the cholesky factor

Definition at line 51 of file linear_solver_cholmod_online.h.

Constructor & Destructor Documentation

◆ LinearSolverCholmodOnline()

template<typename MatrixType>
g2o::LinearSolverCholmodOnline< MatrixType >::LinearSolverCholmodOnline ( )
inline

◆ ~LinearSolverCholmodOnline()

template<typename MatrixType>
virtual g2o::LinearSolverCholmodOnline< MatrixType >::~LinearSolverCholmodOnline ( )
inlinevirtual

Definition at line 69 of file linear_solver_cholmod_online.h.

References _cholmodCommon, _cholmodFactor, and _cholmodSparse.

Member Function Documentation

◆ blockOrdering()

template<typename MatrixType>
bool g2o::LinearSolverCholmodOnline< MatrixType >::blockOrdering ( ) const
inline

Definition at line 124 of file linear_solver_cholmod_online.h.

◆ choleskyUpdate()

template<typename MatrixType>
int g2o::LinearSolverCholmodOnline< MatrixType >::choleskyUpdate ( cholmod_sparse * update)
inlinevirtual

◆ computeSymbolicDecomposition()

◆ fillCholmodExt()

◆ init()

template<typename MatrixType>
virtual bool g2o::LinearSolverCholmodOnline< MatrixType >::init ( )
inlinevirtual

init for operating on matrices with a different non-zero pattern like before

Implements g2o::LinearSolver< MatrixType >.

Definition at line 78 of file linear_solver_cholmod_online.h.

◆ L()

template<typename MatrixType>
cholmod_factor * g2o::LinearSolverCholmodOnline< MatrixType >::L ( ) const
inlinevirtual

◆ nonZerosInL()

template<typename MatrixType>
size_t g2o::LinearSolverCholmodOnline< MatrixType >::nonZerosInL ( ) const
inlinevirtual

return the number of non-zeros in the current factorization

Implements g2o::LinearSolverCholmodOnlineInterface.

Definition at line 131 of file linear_solver_cholmod_online.h.

References _cholmodFactor.

◆ solve() [1/2]

template<typename MatrixType>
bool g2o::LinearSolverCholmodOnline< MatrixType >::solve ( const SparseBlockMatrix< MatrixType > & A,
double * x,
double * b )
inlinevirtual

Assumes that A is the same matrix for several calls. Among other assumptions, the non-zero pattern does not change! If the matrix changes call init() before. solve system Ax = b, x and b have to allocated beforehand!!

Implements g2o::LinearSolver< MatrixType >.

Definition at line 80 of file linear_solver_cholmod_online.h.

References _cholmodCommon, _cholmodFactor, _cholmodSparse, g2o::G2OBatchStatistics::choleskyNNZ, computeSymbolicDecomposition(), fillCholmodExt(), g2o::get_monotonic_time(), g2o::G2OBatchStatistics::globalStats(), g2o::G2OBatchStatistics::timeNumericDecomposition, and g2o::writeCCSMatrix().

◆ solve() [2/2]

template<typename MatrixType>
bool g2o::LinearSolverCholmodOnline< MatrixType >::solve ( double * x,
double * b )
inlinevirtual

Member Data Documentation

◆ _blockOrdering

template<typename MatrixType>
bool g2o::LinearSolverCholmodOnline< MatrixType >::_blockOrdering
protected

Definition at line 176 of file linear_solver_cholmod_online.h.

◆ _blockPermutation

template<typename MatrixType>
Eigen::VectorXi g2o::LinearSolverCholmodOnline< MatrixType >::_blockPermutation
protected

Definition at line 178 of file linear_solver_cholmod_online.h.

Referenced by computeSymbolicDecomposition().

◆ _cholmodCommon

template<typename MatrixType>
cholmod_common g2o::LinearSolverCholmodOnline< MatrixType >::_cholmodCommon
protected

◆ _cholmodFactor

template<typename MatrixType>
cholmod_factor* g2o::LinearSolverCholmodOnline< MatrixType >::_cholmodFactor
protected

◆ _cholmodSparse

◆ _matrixStructure

template<typename MatrixType>
MatrixStructure g2o::LinearSolverCholmodOnline< MatrixType >::_matrixStructure
protected

Definition at line 177 of file linear_solver_cholmod_online.h.

Referenced by computeSymbolicDecomposition().

◆ _scalarPermutation

template<typename MatrixType>
Eigen::VectorXi g2o::LinearSolverCholmodOnline< MatrixType >::_scalarPermutation
protected

Definition at line 178 of file linear_solver_cholmod_online.h.

Referenced by computeSymbolicDecomposition().


The documentation for this class was generated from the following file: