|
g2o
|
linear solver which uses CSparse More...
#include <linear_solver_csparse.h>


Public Member Functions | |
| LinearSolverCSparse () | |
| LinearSolverCSparse (LinearSolverCSparse< MatrixType > const &)=delete | |
| LinearSolverCSparse & | operator= (LinearSolverCSparse< MatrixType > const &)=delete |
| virtual | ~LinearSolverCSparse ()=default |
| virtual bool | init () |
| bool | solve (const SparseBlockMatrix< MatrixType > &A, double *x, double *b) |
Public Member Functions inherited from g2o::LinearSolverCCS< MatrixType > | |
| LinearSolverCCS () | |
| ~LinearSolverCCS () | |
| 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 | blockOrdering () const |
| do the AMD ordering on the blocks or on the scalar matrix | |
| void | setBlockOrdering (bool blockOrdering) |
Public Member Functions inherited from g2o::LinearSolver< MatrixType > | |
| LinearSolver () | |
| virtual | ~LinearSolver () |
| bool | writeDebug () const |
| write a debug dump of the system matrix if it is not PSD in solve | |
| void | setWriteDebug (bool b) |
Protected Member Functions | |
| void | prepareSolve (const SparseBlockMatrix< MatrixType > &A) |
| void | computeSymbolicDecomposition (const SparseBlockMatrix< MatrixType > &A) |
| void | fillCSparse (const SparseBlockMatrix< MatrixType > &A, bool onlyValues) |
| bool | solveBlocks_impl (const SparseBlockMatrix< MatrixType > &A, std::function< void(MarginalCovarianceCholesky &)> compute) |
Protected Member Functions inherited from g2o::LinearSolverCCS< MatrixType > | |
| void | initMatrixStructure (const SparseBlockMatrix< MatrixType > &A) |
Protected Attributes | |
| csparse::CSparse | csparse |
| MatrixStructure | _matrixStructure |
Protected Attributes inherited from g2o::LinearSolverCCS< MatrixType > | |
| SparseBlockMatrixCCS< MatrixType > * | _ccsMatrix |
| bool | _blockOrdering |
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 which uses CSparse
Definition at line 47 of file linear_solver_csparse.h.
|
inline |
Definition at line 49 of file linear_solver_csparse.h.
|
delete |
|
virtualdefault |
|
inlineprotected |
Definition at line 98 of file linear_solver_csparse.h.
References g2o::LinearSolverCSparse< MatrixType >::_matrixStructure, g2o::MatrixStructure::Aii, g2o::csparse::CSparse::amd(), g2o::csparse::CSparse::analyze(), g2o::csparse::CSparse::analyze_p(), g2o::MatrixStructure::Ap, g2o::LinearSolverCCS< MatrixType >::blockOrdering(), g2o::LinearSolver< MatrixType >::blockToScalarPermutation(), g2o::LinearSolverCSparse< MatrixType >::csparse, g2o::SparseBlockMatrix< MatrixType >::fillBlockStructure(), g2o::get_monotonic_time(), g2o::G2OBatchStatistics::globalStats(), g2o::MatrixStructure::n, g2o::MatrixStructure::nzMax(), and g2o::G2OBatchStatistics::timeSymbolicDecomposition.
Referenced by g2o::LinearSolverCSparse< MatrixType >::prepareSolve().
|
inlineprotected |
Definition at line 129 of file linear_solver_csparse.h.
References g2o::LinearSolverCCS< MatrixType >::_ccsMatrix, g2o::SparseBlockMatrix< MatrixType >::cols(), g2o::csparse::CSparse::SparseView::columnsAllocated, g2o::LinearSolverCSparse< MatrixType >::csparse, g2o::csparse::CSparse::SparseView::i, g2o::LinearSolverCCS< MatrixType >::initMatrixStructure(), g2o::csparse::CSparse::SparseView::m, g2o::csparse::CSparse::SparseView::n, g2o::SparseBlockMatrix< MatrixType >::nonZeros(), g2o::csparse::CSparse::SparseView::nzmax, g2o::csparse::CSparse::SparseView::p, g2o::SparseBlockMatrix< MatrixType >::rows(), g2o::csparse::CSparse::sparseView(), and g2o::csparse::CSparse::SparseView::x.
Referenced by g2o::LinearSolverCSparse< MatrixType >::prepareSolve().
|
inlinevirtual |
init for operating on matrices with a different non-zero pattern like before
Implements g2o::LinearSolver< MatrixType >.
Definition at line 57 of file linear_solver_csparse.h.
References g2o::LinearSolverCSparse< MatrixType >::csparse, and g2o::csparse::CSparse::freeSymbolic().
|
delete |
|
inlineprotected |
Definition at line 88 of file linear_solver_csparse.h.
References g2o::LinearSolverCSparse< MatrixType >::computeSymbolicDecomposition(), g2o::LinearSolverCSparse< MatrixType >::csparse, g2o::LinearSolverCSparse< MatrixType >::fillCSparse(), and g2o::csparse::CSparse::hasSymbolic().
Referenced by g2o::LinearSolverCSparse< MatrixType >::solve(), and g2o::LinearSolverCSparse< MatrixType >::solveBlocks_impl().
|
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 62 of file linear_solver_csparse.h.
References g2o::G2OBatchStatistics::choleskyNNZ, g2o::csparse::CSparse::choleskyNz(), g2o::LinearSolverCSparse< MatrixType >::csparse, G2O_DEBUG, G2O_ERROR, g2o::get_monotonic_time(), g2o::G2OBatchStatistics::globalStats(), g2o::LinearSolverCSparse< MatrixType >::prepareSolve(), g2o::csparse::CSparse::solve(), g2o::G2OBatchStatistics::timeNumericDecomposition, g2o::LinearSolver< MatrixType >::writeDebug(), and g2o::csparse::CSparse::writeSparse().
|
inlineprotectedvirtual |
Implementation of the general parts for computing the inverse blocks of the linear system matrix. Here we call a function to do the underlying computation.
Implements g2o::LinearSolverCCS< MatrixType >.
Definition at line 172 of file linear_solver_csparse.h.
References g2o::G2OBatchStatistics::choleskyNNZ, g2o::csparse::CSparse::choleskyNz(), g2o::LinearSolverCSparse< MatrixType >::csparse, g2o::csparse::CSparse::factor(), g2o::csparse::CSparse::factorize(), g2o::csparse::CSparse::freeFactor(), G2O_WARN, g2o::G2OBatchStatistics::globalStats(), g2o::csparse::CSparse::FactorView::i, g2o::csparse::CSparse::FactorView::n, g2o::csparse::CSparse::FactorView::p, g2o::csparse::CSparse::FactorView::pinv, g2o::LinearSolverCSparse< MatrixType >::prepareSolve(), g2o::MarginalCovarianceCholesky::setCholeskyFactor(), and g2o::csparse::CSparse::FactorView::x.
|
protected |
Definition at line 86 of file linear_solver_csparse.h.
Referenced by g2o::LinearSolverCSparse< MatrixType >::computeSymbolicDecomposition().
|
protected |
Definition at line 85 of file linear_solver_csparse.h.
Referenced by g2o::LinearSolverCSparse< MatrixType >::computeSymbolicDecomposition(), g2o::LinearSolverCSparse< MatrixType >::fillCSparse(), g2o::LinearSolverCSparse< MatrixType >::init(), g2o::LinearSolverCSparse< MatrixType >::prepareSolve(), g2o::LinearSolverCSparse< MatrixType >::solve(), and g2o::LinearSolverCSparse< MatrixType >::solveBlocks_impl().