|
g2o
|
#include <graph_optimizer_sparse_incremental.h>


Public Member Functions | |
| SparseOptimizerIncremental () | |
| ~SparseOptimizerIncremental () | |
| int | optimize (int iterations, bool online=false) |
| virtual bool | updateInitialization (HyperGraph::VertexSet &vset, HyperGraph::EdgeSet &eset) |
| virtual bool | initSolver (int dimension, int batchEveryN) |
Public Member Functions inherited from g2o::SparseOptimizerOnline | |
| SparseOptimizerOnline (bool pcg=false) | |
| virtual | ~SparseOptimizerOnline () |
| int | optimize (int iterations, bool online=false) |
| void | update (double *update) |
| virtual void | gnuplotVisualization () |
Public Member Functions inherited from g2o::SparseOptimizer | |
| SparseOptimizer () | |
| virtual | ~SparseOptimizer () |
| virtual bool | initializeOptimization (HyperGraph::EdgeSet &eset) |
| virtual bool | initializeOptimization (HyperGraph::VertexSet &vset, int level=0) |
| virtual bool | initializeOptimization (int level=0) |
| virtual void | computeInitialGuess () |
| virtual void | computeInitialGuess (EstimatePropagatorCost &propagator) |
| virtual void | setToOrigin () |
| bool | computeMarginals (SparseBlockMatrix< MatrixX > &spinv, const std::vector< std::pair< int, int > > &blockIndices) |
| bool | computeMarginals (SparseBlockMatrix< MatrixX > &spinv, const Vertex *vertex) |
| bool | computeMarginals (SparseBlockMatrix< MatrixX > &spinv, const VertexContainer &vertices) |
| virtual Vertex * | findGauge () |
| finds a gauge in the graph to remove the undefined dof. | |
| bool | gaugeFreedom () |
| double | activeChi2 () const |
| double | activeRobustChi2 () const |
| bool | verbose () const |
| verbose information during optimization | |
| void | setVerbose (bool verbose) |
| void | setForceStopFlag (bool *flag) |
| bool * | forceStopFlag () const |
| bool | terminate () |
| if external stop flag is given, return its state. False otherwise | |
| const VertexContainer & | indexMapping () const |
| the index mapping of the vertices | |
| const VertexContainer & | activeVertices () const |
| the vertices active in the current optimization | |
| const EdgeContainer & | activeEdges () const |
| the edges active in the current optimization | |
| virtual bool | removeVertex (HyperGraph::Vertex *v, bool detach=false) |
| VertexContainer::const_iterator | findActiveVertex (const OptimizableGraph::Vertex *v) const |
| EdgeContainer::const_iterator | findActiveEdge (const OptimizableGraph::Edge *e) const |
| const OptimizationAlgorithm * | algorithm () const |
| the solver used by the optimizer | |
| OptimizationAlgorithm * | solver () |
| void | setAlgorithm (OptimizationAlgorithm *algorithm) |
| void | push (SparseOptimizer::VertexContainer &vlist) |
| push the estimate of a subset of the variables onto a stack | |
| void | push (HyperGraph::VertexSet &vlist) |
| push the estimate of a subset of the variables onto a stack | |
| void | push () |
| push all the active vertices onto a stack | |
| void | pop (SparseOptimizer::VertexContainer &vlist) |
| pop (restore) the estimate a subset of the variables from the stack | |
| void | pop (HyperGraph::VertexSet &vlist) |
| pop (restore) the estimate a subset of the variables from the stack | |
| void | pop () |
| pop (restore) the estimate of the active vertices from the stack | |
| void | discardTop (SparseOptimizer::VertexContainer &vlist) |
| void | discardTop () |
| same as above, but for the active vertices | |
| virtual void | clear () |
| void | computeActiveErrors () |
| G2O_ATTRIBUTE_DEPRECATED (void linearizeSystem()) | |
| void | update (const double *update) |
| const BatchStatisticsContainer & | batchStatistics () const |
| BatchStatisticsContainer & | batchStatistics () |
| void | setComputeBatchStatistics (bool computeBatchStatistics) |
| bool | computeBatchStatistics () const |
| bool | addComputeErrorAction (HyperGraphAction *action) |
| add an action to be executed before the error vectors are computed | |
| bool | removeComputeErrorAction (HyperGraphAction *action) |
| virtual void | discardTop () |
| virtual void | discardTop (HyperGraph::VertexSet &vset) |
Public Member Functions inherited from g2o::OptimizableGraph | |
| Vertex * | vertex (int id) |
| returns the vertex number id appropriately casted | |
| const Vertex * | vertex (int id) const |
| returns the vertex number id appropriately casted | |
| OptimizableGraph () | |
| empty constructor | |
| virtual | ~OptimizableGraph () |
| virtual bool | addVertex (HyperGraph::Vertex *v, Data *userData) |
| virtual bool | addVertex (HyperGraph::Vertex *v) |
| bool | addVertex (OptimizableGraph::Vertex *v, Data *userData) |
| bool | addVertex (OptimizableGraph::Vertex *v) |
| virtual bool | addEdge (HyperGraph::Edge *e) |
| bool | addEdge (OptimizableGraph::Edge *e) |
| virtual bool | setEdgeVertex (HyperGraph::Edge *e, int pos, HyperGraph::Vertex *v) |
| double | chi2 () const |
| returns the chi2 of the current configuration | |
| int | maxDimension () const |
| return the maximum dimension of all vertices in the graph | |
| void | recomputeJacobianWorkspaceSize () |
| std::set< int > | dimensions () const |
| virtual void | preIteration (int) |
| virtual void | postIteration (int) |
| bool | addPreIterationAction (HyperGraphAction *action) |
| add an action to be executed before each iteration | |
| bool | addPostIterationAction (HyperGraphAction *action) |
| add an action to be executed after each iteration | |
| bool | removePreIterationAction (HyperGraphAction *action) |
| remove an action that should no longer be executed before each iteration | |
| bool | removePostIterationAction (HyperGraphAction *action) |
| remove an action that should no longer be executed after each iteration | |
| virtual bool | load (std::istream &is) |
| bool | load (const char *filename) |
| virtual bool | save (std::ostream &os, int level=0) const |
| save the graph to a stream. Again uses the Factory system. | |
| bool | save (const char *filename, int level=0) const |
| function provided for convenience, see save() above | |
| bool | saveSubset (std::ostream &os, HyperGraph::VertexSet &vset, int level=0) |
| save a subgraph to a stream. Again uses the Factory system. | |
| bool | saveSubset (std::ostream &os, HyperGraph::EdgeSet &eset) |
| save a subgraph to a stream. Again uses the Factory system. | |
| virtual void | setFixed (HyperGraph::VertexSet &vset, bool fixed) |
| fixes/releases a set of vertices | |
| void | setRenamedTypesFromString (const std::string &types) |
| bool | isSolverSuitable (const OptimizationAlgorithmProperty &solverProperty, const std::set< int > &vertDims=std::set< int >()) const |
| virtual void | clearParameters () |
| bool | addParameter (Parameter *p) |
| Parameter * | parameter (int id) |
| bool | verifyInformationMatrices (bool verbose=false) const |
| bool | saveVertex (std::ostream &os, Vertex *v) const |
| bool | saveParameter (std::ostream &os, Parameter *v) const |
| bool | saveEdge (std::ostream &os, Edge *e) const |
| bool | saveUserData (std::ostream &os, HyperGraph::Data *v) const |
| JacobianWorkspace & | jacobianWorkspace () |
| the workspace for storing the Jacobians of the graph | |
| const JacobianWorkspace & | jacobianWorkspace () const |
| ParameterContainer & | parameters () |
| const ParameterContainer & | parameters () const |
| void | forEachVertex (std::function< void(OptimizableGraph::Vertex *)> fn) |
| apply a unary function to all vertices | |
| void | forEachVertex (HyperGraph::VertexSet &vset, std::function< void(OptimizableGraph::Vertex *)> fn) |
| apply a unary function to the vertices in vset | |
Public Member Functions inherited from g2o::HyperGraph | |
| HyperGraph () | |
| constructs an empty hyper graph | |
| virtual | ~HyperGraph () |
| destroys the hyper-graph and all the vertices of the graph | |
| Vertex * | vertex (int id) |
| const Vertex * | vertex (int id) const |
| virtual bool | removeEdge (Edge *e) |
| const VertexIDMap & | vertices () const |
| VertexIDMap & | vertices () |
| const EdgeSet & | edges () const |
| EdgeSet & | edges () |
| virtual bool | mergeVertices (Vertex *vBig, Vertex *vSmall, bool erase) |
| virtual bool | detachVertex (Vertex *v) |
| virtual bool | changeId (Vertex *v, int newId) |
Protected Member Functions | |
| bool | computeCholeskyUpdate () |
| void | convertTripletUpdateToSparse () |
Protected Member Functions inherited from g2o::SparseOptimizer | |
| void | sortVectorContainers () |
| bool | buildIndexMapping (SparseOptimizer::VertexContainer &vlist) |
| void | clearIndexMapping () |
Protected Member Functions inherited from g2o::OptimizableGraph | |
| void | performActions (int iter, HyperGraphActionSet &actions) |
Additional Inherited Members | |
Public Types inherited from g2o::SparseOptimizer | |
| enum | { AT_COMPUTEACTIVERROR = OptimizableGraph::AT_NUM_ELEMENTS , AT_NUM_ELEMENTS } |
Public Types inherited from g2o::OptimizableGraph | |
| enum | ActionType { AT_PREITERATION , AT_POSTITERATION , AT_NUM_ELEMENTS } |
| typedef std::set< HyperGraphAction * > | HyperGraphActionSet |
| typedef std::vector< OptimizableGraph::Vertex * > | VertexContainer |
| vector container for vertices | |
| typedef std::vector< OptimizableGraph::Edge * > | EdgeContainer |
| vector container for edges | |
Public Types inherited from g2o::HyperGraph | |
| typedef std::bitset< HyperGraph::HGET_NUM_ELEMS > | GraphElemBitset |
| typedef std::set< Edge * > | EdgeSet |
| typedef std::set< Vertex * > | VertexSet |
| typedef std::unordered_map< int, Vertex * > | VertexIDMap |
| typedef std::vector< Vertex * > | VertexContainer |
Static Public Member Functions inherited from g2o::OptimizableGraph | |
| static bool | initMultiThreading () |
Public Attributes inherited from g2o::SparseOptimizerOnline | |
| int | slamDimension |
| HyperGraph::EdgeSet * | newEdges |
| bool | batchStep |
| bool | vizWithGnuplot |
Public Attributes inherited from g2o::OptimizableGraph | |
| class G2O_CORE_API | Vertex |
| class G2O_CORE_API | Edge |
Public Attributes inherited from g2o::HyperGraph | |
| class G2O_CORE_API | Data |
| class G2O_CORE_API | DataContainer |
| class G2O_CORE_API | Vertex |
| class G2O_CORE_API | Edge |
Static Public Attributes inherited from g2o::HyperGraph | |
| static const int | UnassignedId = -1 |
| static const int | InvalidId = -2 |
Definition at line 31 of file graph_optimizer_sparse_incremental.h.
| g2o::SparseOptimizerIncremental::SparseOptimizerIncremental | ( | ) |
Definition at line 57 of file graph_optimizer_sparse_incremental.cpp.
References _cholmodCommon, _cholmodFactor, _cholmodSparse, _L, _permutedUpdate, _permutedUpdateAsSparse, and _solverInterface.
| g2o::SparseOptimizerIncremental::~SparseOptimizerIncremental | ( | ) |
Definition at line 77 of file graph_optimizer_sparse_incremental.cpp.
References _cholmodCommon, _cholmodFactor, _cholmodSparse, _permutedUpdate, _permutedUpdateAsSparse, _updateMat, and g2o::SparseBlockMatrix< MatrixType >::clear().
|
protected |
Definition at line 400 of file graph_optimizer_sparse_incremental.cpp.
References _cholmodCommon, _cholmodFactor, _cholmodSparse, _updateMat, g2o::SparseBlockMatrix< MatrixType >::cols(), g2o::cholmod::CholmodExt::columnsAllocated, g2o::SparseBlockMatrix< MatrixType >::fillCCS(), g2o::SparseBlockMatrix< MatrixType >::nonZeros(), and g2o::SparseBlockMatrix< MatrixType >::rows().
Referenced by updateInitialization().
|
protected |
Definition at line 530 of file graph_optimizer_sparse_incremental.cpp.
References _permutedUpdate, _permutedUpdateAsSparse, _tripletWorkspace, and g2o::cholmod::CholmodExt::columnsAllocated.
Referenced by updateInitialization().
|
virtual |
Reimplemented from g2o::SparseOptimizerOnline.
Definition at line 485 of file graph_optimizer_sparse_incremental.cpp.
References _cmember, _solverInterface, g2o::SparseOptimizerOnline::_underlyingSolver, g2o::LinearSolverCholmodOnlineInterface::batchEveryN, g2o::LinearSolverCholmodOnlineInterface::cmember, g2o::createSolver(), g2o::BlockSolver< Traits >::linearSolver(), g2o::Solver::setAdditionalVectorSpace(), g2o::SparseOptimizer::setAlgorithm(), g2o::BlockSolver< Traits >::setSchur(), g2o::SparseOptimizerOnline::slamDimension, g2o::OptimizationAlgorithmWithHessian::solver(), and g2o::SparseOptimizer::solver().
|
virtual |
starts one optimization run given the current configuration of the graph, and the current settings stored in the class instance. It can be called only after initializeOptimization
Reimplemented from g2o::SparseOptimizer.
Definition at line 89 of file graph_optimizer_sparse_incremental.cpp.
References __PRETTY_FUNCTION__, g2o::SparseOptimizer::_activeEdges, g2o::SparseOptimizer::_algorithm, _cmember, g2o::SparseOptimizer::_ivMap, _L, _perm, _solverInterface, _touchedVertices, g2o::SparseOptimizerOnline::_underlyingSolver, g2o::SparseOptimizer::activeChi2(), g2o::Solver::b(), g2o::SparseOptimizerOnline::batchStep, g2o::Solver::buildStructure(), g2o::Solver::buildSystem(), g2o::OptimizableGraph::Vertex::colInHessian(), g2o::SparseOptimizer::computeActiveErrors(), g2o::OptimizableGraph::Vertex::copyB(), g2o::SparseOptimizerOnline::gnuplotVisualization(), g2o::OptimizableGraph::Vertex::hessianIndex(), g2o::SparseOptimizer::indexMapping(), g2o::OptimizationAlgorithm::init(), g2o::LinearSolverCholmodOnlineInterface::L(), g2o::BaseVertex< D, T >::setEstimate(), g2o::SparseOptimizerOnline::slamDimension, g2o::Solver::solve(), g2o::LinearSolverCholmodOnlineInterface::solve(), g2o::SparseOptimizer::solver(), g2o::SparseOptimizerOnline::update(), g2o::OnlineVertexSE2::updatedEstimate, g2o::OnlineVertexSE3::updatedEstimate, g2o::SparseOptimizer::verbose(), g2o::HyperGraph::Edge::vertices(), g2o::HyperGraph::vertices(), g2o::SparseOptimizerOnline::vizWithGnuplot, and g2o::Solver::x().
|
virtual |
HACK updating the internal structures for online processing
Reimplemented from g2o::SparseOptimizerOnline.
Definition at line 182 of file graph_optimizer_sparse_incremental.cpp.
References g2o::SparseOptimizer::_activeEdges, g2o::SparseOptimizer::_activeVertices, g2o::SparseOptimizer::_algorithm, _cholmodCommon, _cholmodFactor, g2o::SparseOptimizer::_ivMap, _L, _perm, _permutedUpdate, _permutedUpdateAsSparse, _solverInterface, _touchedVertices, _updateMat, g2o::SparseOptimizerOnline::batchStep, g2o::SparseBlockMatrix< MatrixType >::block(), g2o::SparseBlockMatrix< MatrixType >::blockCols(), g2o::LinearSolverCholmodOnlineInterface::choleskyUpdate(), g2o::SparseBlockMatrix< MatrixType >::clear(), g2o::OptimizableGraph::Vertex::clearQuadraticForm(), g2o::SparseBlockMatrix< MatrixType >::colBlockIndices(), computeCholeskyUpdate(), g2o::OptimizableGraph::Edge::computeError(), g2o::OptimizableGraph::Edge::constructQuadraticForm(), convertTripletUpdateToSparse(), g2o::OptimizableGraph::Vertex::dimension(), g2o::OptimizableGraph::Vertex::fixed(), g2o::OptimizableGraph::Vertex::hessianData(), g2o::OptimizableGraph::Vertex::hessianIndex(), g2o::OptimizableGraph::jacobianWorkspace(), g2o::OptimizableGraph::Edge::linearizeOplus(), g2o::OptimizableGraph::Vertex::mapHessianMemory(), g2o::OptimizableGraph::Edge::mapHessianMemory(), g2o::OptimizableGraph::Vertex::marginalized(), g2o::SparseBlockMatrix< MatrixType >::rowBlockIndices(), g2o::OptimizableGraph::Vertex::setHessianIndex(), g2o::SparseOptimizerOnline::slamDimension, g2o::SparseOptimizerOnline::updateInitialization(), g2o::OptimizationAlgorithm::updateStructure(), and g2o::HyperGraph::Edge::vertices().
|
protected |
Definition at line 46 of file graph_optimizer_sparse_incremental.h.
Referenced by computeCholeskyUpdate(), SparseOptimizerIncremental(), updateInitialization(), and ~SparseOptimizerIncremental().
|
protected |
Definition at line 48 of file graph_optimizer_sparse_incremental.h.
Referenced by computeCholeskyUpdate(), SparseOptimizerIncremental(), updateInitialization(), and ~SparseOptimizerIncremental().
|
protected |
Definition at line 47 of file graph_optimizer_sparse_incremental.h.
Referenced by computeCholeskyUpdate(), SparseOptimizerIncremental(), and ~SparseOptimizerIncremental().
|
protected |
Definition at line 55 of file graph_optimizer_sparse_incremental.h.
Referenced by initSolver(), and optimize().
|
protected |
Definition at line 50 of file graph_optimizer_sparse_incremental.h.
Referenced by optimize(), SparseOptimizerIncremental(), and updateInitialization().
|
protected |
Definition at line 54 of file graph_optimizer_sparse_incremental.h.
Referenced by optimize(), and updateInitialization().
|
protected |
Definition at line 49 of file graph_optimizer_sparse_incremental.h.
Referenced by convertTripletUpdateToSparse(), SparseOptimizerIncremental(), updateInitialization(), and ~SparseOptimizerIncremental().
|
protected |
Definition at line 58 of file graph_optimizer_sparse_incremental.h.
Referenced by convertTripletUpdateToSparse(), SparseOptimizerIncremental(), updateInitialization(), and ~SparseOptimizerIncremental().
|
protected |
Definition at line 51 of file graph_optimizer_sparse_incremental.h.
Referenced by initSolver(), optimize(), SparseOptimizerIncremental(), and updateInitialization().
|
protected |
Definition at line 53 of file graph_optimizer_sparse_incremental.h.
Referenced by optimize(), and updateInitialization().
|
protected |
Definition at line 57 of file graph_optimizer_sparse_incremental.h.
Referenced by convertTripletUpdateToSparse().
|
protected |
Definition at line 45 of file graph_optimizer_sparse_incremental.h.
Referenced by computeCholeskyUpdate(), updateInitialization(), and ~SparseOptimizerIncremental().