g2o
sparse_optimizer_terminate_action.h
Go to the documentation of this file.
1 #ifndef SPARSE_OPTIMIZER_TERMINATE_ACTION_H
2 #define SPARSE_OPTIMIZER_TERMINATE_ACTION_H
3 
4 #include "g2o_core_api.h"
5 #include "hyper_graph_action.h"
6 
7 namespace g2o {
8 
9  class SparseOptimizer;
10 
20  {
21  public:
23  virtual HyperGraphAction* operator()(const HyperGraph* graph, Parameters* parameters = 0);
24 
25  double gainThreshold() const { return _gainThreshold;}
26  void setGainThreshold(double gainThreshold);
27 
28  int maxIterations() const { return _maxIterations;}
29  void setMaxIterations(int maxit);
30 
31  protected:
33  double _lastChi;
36 
37  void setOptimizerStopFlag(const SparseOptimizer* optimizer, bool stop);
38  };
39 
40 } // end namespace
41 
42 #endif
stop iterating based on the gain which is (oldChi - currentChi) / currentChi.
class G2O_CORE_API SparseOptimizer
#define G2O_CORE_API
Definition: g2o_core_api.h:29
Protocol The SLAM executable accepts such as solving the and retrieving or vertices in the graph
Definition: protocol.txt:7
Abstract action that operates on an entire graph.