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 More... | |
void | setTolerance (double tolerance) |
int | maxIterations () const |
void | setMaxIterations (int maxIter) |
bool | absoluteTolerance () const |
void | setAbsoluteTolerance (bool absoluteTolerance) |
bool | verbose () const |
void | setVerbose (bool verbose) |
Public Member Functions inherited from g2o::LinearSolver< MatrixType > | |
LinearSolver () | |
virtual | ~LinearSolver () |
virtual bool | solveBlocks (double **&blocks, const SparseBlockMatrix< MatrixType > &A) |
virtual bool | solvePattern (SparseBlockMatrix< MatrixXD > &spinv, const std::vector< std::pair< int, int > > &blockIndices, const SparseBlockMatrix< MatrixType > &A) |
virtual bool | writeDebug () const |
write a debug dump of the system matrix if it is not PSD in solve More... | |
virtual void | setWriteDebug (bool) |
Protected Types | |
typedef std::vector< MatrixType, Eigen::aligned_allocator< MatrixType > > | MatrixVector |
typedef std::vector< const MatrixType * > | MatrixPtrVector |
Protected Member Functions | |
void | multDiag (const std::vector< int > &colBlockIndices, MatrixVector &A, const VectorXD &src, VectorXD &dest) |
void | multDiag (const std::vector< int > &colBlockIndices, MatrixPtrVector &A, const VectorXD &src, VectorXD &dest) |
void | mult (const std::vector< int > &colBlockIndices, const VectorXD &src, VectorXD &dest) |
Protected Attributes | |
double | _tolerance |
double | _residual |
bool | _absoluteTolerance |
bool | _verbose |
int | _maxIter |
MatrixPtrVector | _diag |
MatrixVector | _J |
std::vector< std::pair< int, int > > | _indices |
MatrixPtrVector | _sparseMat |
linear solver using PCG, pre-conditioner is block Jacobi
Definition at line 47 of file linear_solver_pcg.h.
|
protected |
Definition at line 89 of file linear_solver_pcg.h.
|
protected |
Definition at line 88 of file linear_solver_pcg.h.
|
inline |
Definition at line 50 of file linear_solver_pcg.h.
References g2o::LinearSolverPCG< MatrixType >::_tolerance, and g2o::LinearSolverPCG< MatrixType >::_verbose.
|
inlinevirtual |
Definition at line 60 of file linear_solver_pcg.h.
|
inline |
Definition at line 81 of file linear_solver_pcg.h.
Referenced by g2o::LinearSolverPCG< MatrixType >::setAbsoluteTolerance().
|
inlinevirtual |
init for operating on matrices with a different non-zero pattern like before
Implements g2o::LinearSolver< MatrixType >.
Definition at line 64 of file linear_solver_pcg.h.
References g2o::LinearSolverPCG< MatrixType >::_residual.
|
inline |
Definition at line 78 of file linear_solver_pcg.h.
References g2o::LinearSolverPCG< MatrixType >::_maxIter.
|
protected |
Definition at line 180 of file linear_solver_pcg.h.
|
protected |
Definition at line 160 of file linear_solver_pcg.h.
|
protected |
Definition at line 170 of file linear_solver_pcg.h.
|
inline |
Definition at line 82 of file linear_solver_pcg.h.
References g2o::LinearSolverPCG< MatrixType >::_absoluteTolerance, and g2o::LinearSolverPCG< MatrixType >::absoluteTolerance().
|
inline |
Definition at line 79 of file linear_solver_pcg.h.
References g2o::LinearSolverPCG< MatrixType >::_maxIter.
|
inline |
Definition at line 76 of file linear_solver_pcg.h.
References g2o::LinearSolverPCG< MatrixType >::_tolerance, and g2o::LinearSolverPCG< MatrixType >::tolerance().
|
inline |
Definition at line 85 of file linear_solver_pcg.h.
References g2o::LinearSolverPCG< MatrixType >::_verbose, and g2o::LinearSolverPCG< MatrixType >::verbose().
|
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 81 of file linear_solver_pcg.h.
References g2o::LinearSolverPCG< MatrixType >::_absoluteTolerance.
|
inline |
return the tolerance for terminating PCG before convergence
Definition at line 75 of file linear_solver_pcg.h.
References g2o::LinearSolverPCG< MatrixType >::_tolerance.
Referenced by g2o::LinearSolverPCG< MatrixType >::setTolerance().
|
inline |
Definition at line 84 of file linear_solver_pcg.h.
References g2o::LinearSolverPCG< MatrixType >::_verbose.
Referenced by g2o::LinearSolverPCG< MatrixType >::setVerbose().
|
protected |
Definition at line 93 of file linear_solver_pcg.h.
Referenced by g2o::LinearSolverPCG< MatrixType >::setAbsoluteTolerance(), and g2o::LinearSolverPCG< MatrixType >::solve().
|
protected |
Definition at line 97 of file linear_solver_pcg.h.
|
protected |
Definition at line 100 of file linear_solver_pcg.h.
|
protected |
Definition at line 98 of file linear_solver_pcg.h.
|
protected |
Definition at line 95 of file linear_solver_pcg.h.
Referenced by g2o::LinearSolverPCG< MatrixType >::maxIterations(), and g2o::LinearSolverPCG< MatrixType >::setMaxIterations().
|
protected |
Definition at line 92 of file linear_solver_pcg.h.
Referenced by g2o::LinearSolverPCG< MatrixType >::init().
|
protected |
Definition at line 101 of file linear_solver_pcg.h.
|
protected |
Definition at line 91 of file linear_solver_pcg.h.
Referenced by g2o::LinearSolverPCG< MatrixType >::LinearSolverPCG(), g2o::LinearSolverPCG< MatrixType >::setTolerance(), and g2o::LinearSolverPCG< MatrixType >::tolerance().
|
protected |
Definition at line 94 of file linear_solver_pcg.h.
Referenced by g2o::LinearSolverPCG< MatrixType >::LinearSolverPCG(), g2o::LinearSolverPCG< MatrixType >::setVerbose(), and g2o::LinearSolverPCG< MatrixType >::verbose().