|
g2o
|
basic solver for Ax = b More...
#include <linear_solver.h>

Public Member Functions | |
| LinearSolver () | |
| virtual | ~LinearSolver () |
| virtual bool | init ()=0 |
| virtual bool | solve (const SparseBlockMatrix< MatrixType > &A, double *x, double *b)=0 |
| 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) |
Static Public Member Functions | |
| 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) |
Protected Attributes | |
| bool | _writeDebug |
basic solver for Ax = b
basic solver for Ax = b which has to reimplemented for different linear algebra libraries. A is assumed to be symmetric (only upper triangular block is stored) and positive-semi-definite.
Definition at line 47 of file linear_solver.h.
|
inline |
Definition at line 49 of file linear_solver.h.
|
inlinevirtual |
Definition at line 50 of file linear_solver.h.
|
inlinestatic |
allocate block memory structure
Definition at line 97 of file linear_solver.h.
References g2o::SparseBlockMatrix< MatrixType >::colsOfBlock(), g2o::SparseBlockMatrix< MatrixType >::rowBlockIndices(), g2o::SparseBlockMatrix< MatrixType >::rows(), and g2o::SparseBlockMatrix< MatrixType >::rowsOfBlock().
Referenced by g2o::LinearSolverCCS< MatrixType >::solveBlocks().
|
inlinestatic |
Convert a block permutation matrix to a scalar permutation
Definition at line 122 of file linear_solver.h.
References g2o::SparseBlockMatrix< MatrixType >::colBaseOfBlock(), g2o::SparseBlockMatrix< MatrixType >::colBlockIndices(), g2o::SparseBlockMatrix< MatrixType >::cols(), and g2o::SparseBlockMatrix< MatrixType >::colsOfBlock().
Referenced by g2o::LinearSolverCholmod< MatrixType >::computeSymbolicDecomposition(), g2o::LinearSolverCSparse< MatrixType >::computeSymbolicDecomposition(), and g2o::LinearSolverEigen< MatrixType >::computeSymbolicDecomposition().
|
inlinestatic |
de-allocate the block structure
Definition at line 109 of file linear_solver.h.
References g2o::SparseBlockMatrix< MatrixType >::rowBlockIndices().
|
pure virtual |
init for operating on matrices with a different non-zero pattern like before
Implemented in g2o::LinearSolverCholmodOnline< MatrixType >, g2o::LinearSolverCholmod< MatrixType >, g2o::LinearSolverCSparse< MatrixType >, g2o::LinearSolverDense< MatrixType >, g2o::LinearSolverEigen< MatrixType >, and g2o::LinearSolverPCG< MatrixType >.
|
inline |
Definition at line 94 of file linear_solver.h.
References g2o::LinearSolver< MatrixType >::_writeDebug.
|
pure virtual |
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!!
Implemented in g2o::LinearSolverCholmodOnline< MatrixType >, g2o::LinearSolverCholmod< MatrixType >, g2o::LinearSolverCSparse< MatrixType >, g2o::LinearSolverDense< MatrixType >, g2o::LinearSolverEigen< MatrixType >, and g2o::LinearSolverPCG< MatrixType >.
|
inlinevirtual |
Inverts the diagonal blocks of A
Reimplemented in g2o::LinearSolverCCS< MatrixType >.
Definition at line 71 of file linear_solver.h.
|
inlinevirtual |
Inverts the a block pattern of A in spinv
Reimplemented in g2o::LinearSolverCCS< MatrixType >.
Definition at line 82 of file linear_solver.h.
|
inline |
write a debug dump of the system matrix if it is not PSD in solve
Definition at line 93 of file linear_solver.h.
References g2o::LinearSolver< MatrixType >::_writeDebug.
Referenced by g2o::LinearSolverEigen< MatrixType >::computeCholesky(), g2o::LinearSolverCholmod< MatrixType >::computeCholmodFactor(), and g2o::LinearSolverCSparse< MatrixType >::solve().
|
protected |
Definition at line 143 of file linear_solver.h.
Referenced by g2o::LinearSolver< MatrixType >::setWriteDebug(), and g2o::LinearSolver< MatrixType >::writeDebug().