|
g2o
|
stop iterating based on the gain which is (oldChi - currentChi) / currentChi. More...
#include <sparse_optimizer_terminate_action.h>


Public Member Functions | |
| SparseOptimizerTerminateAction () | |
| virtual HyperGraphAction * | operator() (const HyperGraph *graph, Parameters *parameters=0) |
| double | gainThreshold () const |
| void | setGainThreshold (double gainThreshold) |
| int | maxIterations () const |
| void | setMaxIterations (int maxit) |
Public Member Functions inherited from g2o::HyperGraphAction | |
| virtual | ~HyperGraphAction () |
Protected Member Functions | |
| void | setOptimizerStopFlag (const SparseOptimizer *optimizer, bool stop) |
Protected Attributes | |
| double | _gainThreshold |
| double | _lastChi |
| bool | _auxTerminateFlag |
| int | _maxIterations |
stop iterating based on the gain which is (oldChi - currentChi) / currentChi.
stop iterating based on the gain which is (oldChi - currentChi) / currentChi. If the gain is larger than zero and below the threshold, then the optimizer is stopped. Typically usage of this action includes adding it as a postIteration action, by calling addPostIterationAction on a sparse optimizer.
Definition at line 47 of file sparse_optimizer_terminate_action.h.
| g2o::SparseOptimizerTerminateAction::SparseOptimizerTerminateAction | ( | ) |
Definition at line 36 of file sparse_optimizer_terminate_action.cpp.
|
inline |
Definition at line 53 of file sparse_optimizer_terminate_action.h.
Referenced by setGainThreshold().
|
inline |
Definition at line 56 of file sparse_optimizer_terminate_action.h.
|
virtual |
re-implement to carry out an action given the graph
Reimplemented from g2o::HyperGraphAction.
Definition at line 47 of file sparse_optimizer_terminate_action.cpp.
References _gainThreshold, _lastChi, _maxIterations, g2o::SparseOptimizer::activeRobustChi2(), g2o::HyperGraphAction::ParametersIteration::iteration, and setOptimizerStopFlag().
| void g2o::SparseOptimizerTerminateAction::setGainThreshold | ( | double | gainThreshold | ) |
Definition at line 43 of file sparse_optimizer_terminate_action.cpp.
References _gainThreshold, and gainThreshold().
Referenced by main().
| void g2o::SparseOptimizerTerminateAction::setMaxIterations | ( | int | maxit | ) |
Definition at line 86 of file sparse_optimizer_terminate_action.cpp.
References _maxIterations.
Referenced by main().
|
protected |
Definition at line 90 of file sparse_optimizer_terminate_action.cpp.
References _auxTerminateFlag, and g2o::SparseOptimizer::forceStopFlag().
Referenced by operator()().
|
protected |
Definition at line 62 of file sparse_optimizer_terminate_action.h.
Referenced by setOptimizerStopFlag().
|
protected |
Definition at line 60 of file sparse_optimizer_terminate_action.h.
Referenced by operator()(), and setGainThreshold().
|
protected |
Definition at line 61 of file sparse_optimizer_terminate_action.h.
Referenced by operator()().
|
protected |
Definition at line 63 of file sparse_optimizer_terminate_action.h.
Referenced by operator()(), and setMaxIterations().