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

linear solver using dense cholesky decomposition More...

#include <linear_solver_dense.h>

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

Public Member Functions

 LinearSolverDense ()
virtual ~LinearSolverDense ()
virtual bool init ()
bool solve (const SparseBlockMatrix< MatrixType > &A, double *x, double *b)
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)

Protected Attributes

bool _reset
MatrixX _H
Eigen::LDLT< MatrixX > _cholesky
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)

Detailed Description

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

linear solver using dense cholesky decomposition

Definition at line 46 of file linear_solver_dense.h.

Constructor & Destructor Documentation

◆ LinearSolverDense()

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

◆ ~LinearSolverDense()

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

Definition at line 50 of file linear_solver_dense.h.

Member Function Documentation

◆ init()

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

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

Implements g2o::LinearSolver< MatrixType >.

Definition at line 52 of file linear_solver_dense.h.

References _reset.

◆ solve()

template<typename MatrixType>
bool g2o::LinearSolverDense< 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 57 of file linear_solver_dense.h.

References _cholesky, _H, _reset, g2o::SparseBlockMatrix< MatrixType >::blockCols(), g2o::SparseBlockMatrix< MatrixType >::colBaseOfBlock(), g2o::SparseBlockMatrix< MatrixType >::cols(), g2o::SparseBlockMatrix< MatrixType >::colsOfBlock(), g2o::SparseBlockMatrix< MatrixType >::rowBaseOfBlock(), g2o::SparseBlockMatrix< MatrixType >::rowsOfBlock(), and g2o::SparseBlockMatrix< MatrixType >::transpose().

Member Data Documentation

◆ _cholesky

template<typename MatrixType>
Eigen::LDLT<MatrixX> g2o::LinearSolverDense< MatrixType >::_cholesky
protected

Definition at line 110 of file linear_solver_dense.h.

Referenced by solve().

◆ _H

template<typename MatrixType>
MatrixX g2o::LinearSolverDense< MatrixType >::_H
protected

Definition at line 109 of file linear_solver_dense.h.

Referenced by solve().

◆ _reset

template<typename MatrixType>
bool g2o::LinearSolverDense< MatrixType >::_reset
protected

Definition at line 108 of file linear_solver_dense.h.

Referenced by init(), LinearSolverDense(), and solve().


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