g2o
|
Base for solvers operating on the approximated Hessian, e.g., Gauss-Newton, Levenberg. More...
#include <optimization_algorithm_with_hessian.h>
Public Member Functions | |
OptimizationAlgorithmWithHessian (Solver *solver) | |
virtual | ~OptimizationAlgorithmWithHessian () |
virtual bool | init (bool online=false) |
virtual bool | computeMarginals (SparseBlockMatrix< MatrixXD > &spinv, const std::vector< std::pair< int, int > > &blockIndices) |
virtual bool | buildLinearStructure () |
virtual void | updateLinearSystem () |
virtual bool | updateStructure (const std::vector< HyperGraph::Vertex * > &vset, const HyperGraph::EdgeSet &edges) |
Solver * | solver () |
return the underlying solver used to solve the linear system More... | |
virtual void | setWriteDebug (bool writeDebug) |
virtual bool | writeDebug () const |
Public Member Functions inherited from g2o::OptimizationAlgorithm | |
OptimizationAlgorithm () | |
virtual | ~OptimizationAlgorithm () |
virtual SolverResult | solve (int iteration, bool online=false)=0 |
virtual void | printVerbose (std::ostream &os) const |
const SparseOptimizer * | optimizer () const |
return the optimizer operating on More... | |
SparseOptimizer * | optimizer () |
void | setOptimizer (SparseOptimizer *optimizer) |
const PropertyMap & | properties () const |
return the properties of the solver More... | |
bool | updatePropertiesFromString (const std::string &propString) |
void | printProperties (std::ostream &os) const |
Protected Attributes | |
Solver * | _solver |
Property< bool > * | _writeDebug |
Protected Attributes inherited from g2o::OptimizationAlgorithm | |
SparseOptimizer * | _optimizer |
the optimizer the solver is working on More... | |
PropertyMap | _properties |
the properties of your solver, use this to store the parameters of your solver More... | |
Base for solvers operating on the approximated Hessian, e.g., Gauss-Newton, Levenberg.
Definition at line 40 of file optimization_algorithm_with_hessian.h.
|
explicit |
Definition at line 38 of file optimization_algorithm_with_hessian.cpp.
References g2o::OptimizationAlgorithm::_properties, _writeDebug, and g2o::PropertyMap::makeProperty().
|
virtual |
Definition at line 45 of file optimization_algorithm_with_hessian.cpp.
References _solver.
|
virtual |
Definition at line 80 of file optimization_algorithm_with_hessian.cpp.
References _solver, and g2o::Solver::buildStructure().
Referenced by g2o::computeSimpleStars(), and g2o::Star::labelStarEdges().
|
virtual |
computes the block diagonal elements of the pattern specified in the input and stores them in given SparseBlockMatrix. If your solver does not support computing the marginals, return false.
Implements g2o::OptimizationAlgorithm.
Definition at line 75 of file optimization_algorithm_with_hessian.cpp.
References _solver, and g2o::Solver::computeMarginals().
|
virtual |
initialize the solver, called once before the first call to solve()
Implements g2o::OptimizationAlgorithm.
Definition at line 50 of file optimization_algorithm_with_hessian.cpp.
References g2o::OptimizationAlgorithm::_optimizer, _solver, _writeDebug, g2o::SparseOptimizer::activeVertices(), g2o::Solver::init(), g2o::OptimizableGraph::Vertex::marginalized(), g2o::Solver::setSchur(), g2o::Solver::setWriteDebug(), g2o::Solver::supportsSchur(), and g2o::Property< T >::value().
|
virtual |
write debug output of the Hessian if system is not positive definite
Definition at line 96 of file optimization_algorithm_with_hessian.cpp.
References _writeDebug, and g2o::Property< T >::setValue().
|
inline |
return the underlying solver used to solve the linear system
Definition at line 57 of file optimization_algorithm_with_hessian.h.
Referenced by g2o::SparseOptimizerIncremental::initSolver().
|
virtual |
Definition at line 85 of file optimization_algorithm_with_hessian.cpp.
References _solver, and g2o::Solver::buildSystem().
Referenced by g2o::computeSimpleStars(), and g2o::Star::labelStarEdges().
|
virtual |
update the structures for online processing
Implements g2o::OptimizationAlgorithm.
Definition at line 91 of file optimization_algorithm_with_hessian.cpp.
References _solver, and g2o::Solver::updateStructure().
|
inlinevirtual |
Definition at line 63 of file optimization_algorithm_with_hessian.h.
|
protected |
Definition at line 66 of file optimization_algorithm_with_hessian.h.
Referenced by buildLinearStructure(), computeMarginals(), g2o::OptimizationAlgorithmLevenberg::computeScale(), init(), g2o::OptimizationAlgorithmGaussNewton::printVerbose(), g2o::OptimizationAlgorithmLevenberg::printVerbose(), g2o::OptimizationAlgorithmLevenberg::solve(), g2o::OptimizationAlgorithmGaussNewton::solve(), g2o::OptimizationAlgorithmDogleg::solve(), updateLinearSystem(), updateStructure(), and ~OptimizationAlgorithmWithHessian().
|
protected |
Definition at line 67 of file optimization_algorithm_with_hessian.h.
Referenced by init(), OptimizationAlgorithmWithHessian(), and setWriteDebug().