|
g2o
|
linear solver using PCG, pre-conditioner is block Jacobi More...
#include <linear_solver_pcg.h>


Public Member Functions | |
| LinearSolverPCG () | |
| virtual | ~LinearSolverPCG () |
| virtual bool | init () |
| bool | solve (const SparseBlockMatrix< MatrixType > &A, double *x, double *b) |
| double | tolerance () const |
| return the tolerance for terminating PCG before convergence | |
| void | setTolerance (double tolerance) |
| int | maxIterations () const |
| void | setMaxIterations (int maxIter) |
| bool | absoluteTolerance () const |
| void | setAbsoluteTolerance (bool absoluteTolerance) |
| 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 Types | |
| using | MatrixVector = std::vector<MatrixType> |
| using | MatrixPtrVector = std::vector<const MatrixType*> |
Protected Member Functions | |
| void | multDiag (const std::vector< int > &colBlockIndices, MatrixVector &A, const VectorX &src, VectorX &dest) |
| void | multDiag (const std::vector< int > &colBlockIndices, MatrixPtrVector &A, const VectorX &src, VectorX &dest) |
| void | mult (const std::vector< int > &colBlockIndices, const VectorX &src, VectorX &dest) |
Protected Attributes | |
| double | _tolerance |
| double | _residual |
| bool | _absoluteTolerance |
| int | _maxIter |
| MatrixPtrVector | _diag |
| MatrixVector | _J |
| std::vector< std::pair< int, int > > | _indices |
| MatrixPtrVector | _sparseMat |
| 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) |
linear solver using PCG, pre-conditioner is block Jacobi
Definition at line 43 of file linear_solver_pcg.h.
|
protected |
Definition at line 77 of file linear_solver_pcg.h.
|
protected |
Definition at line 76 of file linear_solver_pcg.h.
|
inline |
Definition at line 45 of file linear_solver_pcg.h.
References g2o::LinearSolver< MatrixType >::LinearSolver().
|
inlinevirtual |
Definition at line 52 of file linear_solver_pcg.h.
|
inline |
Definition at line 70 of file linear_solver_pcg.h.
References _absoluteTolerance.
Referenced by setAbsoluteTolerance().
|
inlinevirtual |
init for operating on matrices with a different non-zero pattern like before
Implements g2o::LinearSolver< MatrixType >.
Definition at line 54 of file linear_solver_pcg.h.
References _indices, _residual, and _sparseMat.
|
inline |
Definition at line 67 of file linear_solver_pcg.h.
References _maxIter.
|
protected |
Definition at line 186 of file linear_solver_pcg.h.
|
protected |
Definition at line 175 of file linear_solver_pcg.h.
|
protected |
Definition at line 164 of file linear_solver_pcg.h.
|
inline |
Definition at line 71 of file linear_solver_pcg.h.
References _absoluteTolerance, and absoluteTolerance().
|
inline |
|
inline |
|
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!!
Implements g2o::LinearSolver< MatrixType >.
Definition at line 88 of file linear_solver_pcg.h.
|
inline |
return the tolerance for terminating PCG before convergence
Definition at line 64 of file linear_solver_pcg.h.
References _tolerance.
Referenced by setTolerance().
|
protected |
Definition at line 81 of file linear_solver_pcg.h.
Referenced by absoluteTolerance(), and setAbsoluteTolerance().
|
protected |
Definition at line 84 of file linear_solver_pcg.h.
|
protected |
Definition at line 87 of file linear_solver_pcg.h.
Referenced by init().
|
protected |
Definition at line 85 of file linear_solver_pcg.h.
|
protected |
Definition at line 82 of file linear_solver_pcg.h.
Referenced by maxIterations(), and setMaxIterations().
|
protected |
Definition at line 80 of file linear_solver_pcg.h.
Referenced by init().
|
protected |
Definition at line 88 of file linear_solver_pcg.h.
Referenced by init().
|
protected |
Definition at line 79 of file linear_solver_pcg.h.
Referenced by setTolerance(), and tolerance().