27 #ifndef G2O_GRAPH_OPTIMIZER_CHOL_H_ 28 #define G2O_GRAPH_OPTIMIZER_CHOL_H_ 42 class ActivePathCostFunction;
44 class EstimatePropagatorCost;
54 friend class ActivePathCostFunction;
89 virtual bool initializeOptimization(
int level=0);
104 virtual void computeInitialGuess();
114 virtual void setToOrigin();
122 int optimize(
int iterations,
bool online =
false);
140 if (vertex->hessianIndex() < 0) {
143 std::vector<std::pair<int, int> > index;
144 index.push_back(std::pair<int, int>(vertex->hessianIndex(), vertex->hessianIndex()));
145 return computeMarginals(spinv, index);
155 std::vector<std::pair<int, int> > indices;
156 for (VertexContainer::const_iterator it = vertices.begin(); it != vertices.end(); ++it) {
157 indices.push_back(std::pair<int, int>((*it)->hessianIndex(),(*it)->hessianIndex()));
159 return computeMarginals(spinv, indices);
165 virtual Vertex* findGauge();
170 double activeChi2()
const;
176 double activeRobustChi2()
const;
180 void setVerbose(
bool verbose);
185 void setForceStopFlag(
bool* flag);
189 bool terminate() {
return _forceStopFlag ? (*_forceStopFlag) :
false; }
246 virtual void clear();
251 void computeActiveErrors();
267 void update(
const double* update);
278 void setComputeBatchStatistics(
bool computeBatchStatistics);
298 void sortVectorContainers();
306 void clearIndexMapping();
const BatchStatisticsContainer & batchStatistics() const
bool computeMarginals(SparseBlockMatrix< MatrixXD > &spinv, const VertexContainer &vertices)
bool terminate()
if external stop flag is given, return its state. False otherwise
VertexContainer _activeVertices
sorted according to VertexIDCompare
std::vector< Vertex * > VertexContainer
std::set< Vertex * > VertexSet
OptimizationAlgorithm * solver()
const EdgeContainer & activeEdges() const
the edges active in the current optimization
class G2O_CORE_API OptimizationAlgorithm
std::vector< OptimizableGraph::Edge * > EdgeContainer
vector container for edges
std::set< Edge * > EdgeSet
Protocol The SLAM executable accepts such as solving the and retrieving or vertices in the explicitly state the reprensentation poses are represented by poses by VERTEX_XYZRPY In the Quaternions and other representations could be but note that it is up to the SLAM algorithm to choose the internal representation of the angles The keyword is followed by a unique vertex ID and an optional initialization of the or edges in the explicitly state the type of the constraint pose constraints are given by pose constraints by EDGE_XYZRPY The keyword is followed by a unique edge the IDs of the referenced vertices
class G2O_CORE_API SparseOptimizer
BatchStatisticsContainer _batchStatistics
global statistics of the optimizer, e.g., timing, num-non-zeros
const VertexContainer & indexMapping() const
the index mapping of the vertices
EdgeContainer _activeEdges
sorted according to EdgeIDCompare
cost for traversing along active edges in the optimizer
BatchStatisticsContainer & batchStatistics()
bool _computeBatchStatistics
A general case Vertex for optimization.
abstract Vertex, your types must derive from that one
bool computeBatchStatistics() const
bool * forceStopFlag() const
#define G2O_ATTRIBUTE_DEPRECATED(func)
const VertexContainer & activeVertices() const
the vertices active in the current optimization
virtual void discardTop()
discard the last backup of the estimate for all variables by removing it from the stack ...
Generic interface for a non-linear solver operating on a graph.
bool verbose() const
verbose information during optimization
const OptimizationAlgorithm * algorithm() const
the solver used by the optimizer
std::vector< G2OBatchStatistics > BatchStatisticsContainer
Sparse matrix which uses blocks.
OptimizationAlgorithm * _algorithm
bool computeMarginals(SparseBlockMatrix< MatrixXD > &spinv, const Vertex *vertex)
Abstract action that operates on an entire graph.