#include <NonlinearOptimizerParams.h>
Public Types | |
using | IterationHook = std::function< void(size_t, double, double)> |
enum | LinearSolverType { MULTIFRONTAL_CHOLESKY, MULTIFRONTAL_QR, SEQUENTIAL_CHOLESKY, SEQUENTIAL_QR, Iterative, CHOLMOD } |
enum | Verbosity { SILENT, TERMINATION, ERROR, VALUES, DELTA, LINEAR } |
Public Member Functions | |
bool | equals (const NonlinearOptimizerParams &other, double tol=1e-9) const |
double | getAbsoluteErrorTol () const |
GaussianFactorGraph::Eliminate | getEliminationFunction () const |
double | getErrorTol () const |
std::string | getLinearSolverType () const |
size_t | getMaxIterations () const |
std::string | getOrderingType () const |
double | getRelativeErrorTol () const |
std::string | getVerbosity () const |
bool | isCholmod () const |
bool | isIterative () const |
bool | isMultifrontal () const |
bool | isSequential () const |
NonlinearOptimizerParams ()=default | |
virtual void | print (const std::string &str="") const |
void | setAbsoluteErrorTol (double value) |
void | setErrorTol (double value) |
void | setIterativeParams (const boost::shared_ptr< IterativeOptimizationParameters > params) |
void | setLinearSolverType (const std::string &solver) |
void | setMaxIterations (int value) |
void | setOrdering (const Ordering &ordering) |
void | setOrderingType (const std::string &ordering) |
void | setRelativeErrorTol (double value) |
void | setVerbosity (const std::string &src) |
virtual | ~NonlinearOptimizerParams () |
Static Public Member Functions | |
static Verbosity | verbosityTranslator (const std::string &s) |
static std::string | verbosityTranslator (Verbosity value) |
Public Attributes | |
double | absoluteErrorTol = 1e-5 |
The maximum absolute error decrease to stop iterating (default 1e-5) More... | |
double | errorTol = 0.0 |
The maximum total error to stop iterating (default 0.0) More... | |
IterationHook | iterationHook |
IterativeOptimizationParameters::shared_ptr | iterativeParams |
The container for iterativeOptimization parameters. used in CG Solvers. More... | |
LinearSolverType | linearSolverType = MULTIFRONTAL_CHOLESKY |
The type of linear solver to use in the nonlinear optimizer. More... | |
size_t | maxIterations = 100 |
The maximum iterations to stop iterating (default 100) More... | |
boost::optional< Ordering > | ordering |
The optional variable elimination ordering, or empty to use COLAMD (default: empty) More... | |
Ordering::OrderingType | orderingType = Ordering::COLAMD |
The method of ordering use during variable elimination (default COLAMD) More... | |
double | relativeErrorTol = 1e-5 |
The maximum relative error decrease to stop iterating (default 1e-5) More... | |
Verbosity | verbosity = SILENT |
The printing verbosity during optimization (default SILENT) More... | |
Private Member Functions | |
std::string | linearSolverTranslator (LinearSolverType linearSolverType) const |
LinearSolverType | linearSolverTranslator (const std::string &linearSolverType) const |
std::string | orderingTypeTranslator (Ordering::OrderingType type) const |
Ordering::OrderingType | orderingTypeTranslator (const std::string &type) const |
The common parameters for Nonlinear optimizers. Most optimizers deriving from NonlinearOptimizer also subclass the parameters.
Definition at line 34 of file NonlinearOptimizerParams.h.
using gtsam::NonlinearOptimizerParams::IterationHook = std::function< void(size_t , double, double)> |
Type for an optional user-provided hook to be called after each internal optimizer iteration. See iterationHook below.
Definition at line 68 of file NonlinearOptimizerParams.h.
See NonlinearOptimizerParams::linearSolverType
Enumerator | |
---|---|
MULTIFRONTAL_CHOLESKY | |
MULTIFRONTAL_QR | |
SEQUENTIAL_CHOLESKY | |
SEQUENTIAL_QR | |
Iterative | |
CHOLMOD |
Definition at line 97 of file NonlinearOptimizerParams.h.
See NonlinearOptimizerParams::verbosity
Enumerator | |
---|---|
SILENT | |
TERMINATION | |
ERROR | |
VALUES | |
DELTA | |
LINEAR |
Definition at line 37 of file NonlinearOptimizerParams.h.
|
default |
|
inlinevirtual |
Definition at line 111 of file NonlinearOptimizerParams.h.
|
inline |
Definition at line 116 of file NonlinearOptimizerParams.h.
|
inline |
Definition at line 50 of file NonlinearOptimizerParams.h.
|
inline |
Definition at line 145 of file NonlinearOptimizerParams.h.
|
inline |
Definition at line 51 of file NonlinearOptimizerParams.h.
|
inline |
Definition at line 161 of file NonlinearOptimizerParams.h.
|
inline |
Definition at line 48 of file NonlinearOptimizerParams.h.
|
inline |
Definition at line 176 of file NonlinearOptimizerParams.h.
|
inline |
Definition at line 49 of file NonlinearOptimizerParams.h.
|
inline |
Definition at line 52 of file NonlinearOptimizerParams.h.
|
inline |
Definition at line 137 of file NonlinearOptimizerParams.h.
|
inline |
Definition at line 141 of file NonlinearOptimizerParams.h.
|
inline |
Definition at line 127 of file NonlinearOptimizerParams.h.
|
inline |
Definition at line 132 of file NonlinearOptimizerParams.h.
|
private |
Definition at line 127 of file NonlinearOptimizerParams.cpp.
|
private |
Definition at line 149 of file NonlinearOptimizerParams.cpp.
|
private |
Definition at line 168 of file NonlinearOptimizerParams.cpp.
|
private |
Definition at line 185 of file NonlinearOptimizerParams.cpp.
|
virtual |
Reimplemented in gtsam::LevenbergMarquardtParams, and gtsam::DoglegParams.
Definition at line 75 of file NonlinearOptimizerParams.cpp.
|
inline |
Definition at line 56 of file NonlinearOptimizerParams.h.
|
inline |
Definition at line 57 of file NonlinearOptimizerParams.h.
void gtsam::NonlinearOptimizerParams::setIterativeParams | ( | const boost::shared_ptr< IterativeOptimizationParameters > | params | ) |
Definition at line 69 of file NonlinearOptimizerParams.cpp.
|
inline |
Definition at line 165 of file NonlinearOptimizerParams.h.
|
inline |
Definition at line 54 of file NonlinearOptimizerParams.h.
|
inline |
Definition at line 171 of file NonlinearOptimizerParams.h.
|
inline |
Definition at line 181 of file NonlinearOptimizerParams.h.
|
inline |
Definition at line 55 of file NonlinearOptimizerParams.h.
|
inline |
Definition at line 58 of file NonlinearOptimizerParams.h.
|
static |
Definition at line 17 of file NonlinearOptimizerParams.cpp.
|
static |
Definition at line 39 of file NonlinearOptimizerParams.cpp.
double gtsam::NonlinearOptimizerParams::absoluteErrorTol = 1e-5 |
The maximum absolute error decrease to stop iterating (default 1e-5)
Definition at line 43 of file NonlinearOptimizerParams.h.
double gtsam::NonlinearOptimizerParams::errorTol = 0.0 |
The maximum total error to stop iterating (default 0.0)
Definition at line 44 of file NonlinearOptimizerParams.h.
IterationHook gtsam::NonlinearOptimizerParams::iterationHook |
Optional user-provided iteration hook to be called after each optimization iteration (Default: none). Note that IterationHook
is defined as a std::function<> with this signature:
which allows binding by means of a reference to a regular function:
or to a C++11 lambda (preferred if you need to capture additional context variables, such that the optimizer object itself, the factor graph, etc.):
or to the result of a properly-formed std::bind
call.
Definition at line 94 of file NonlinearOptimizerParams.h.
IterativeOptimizationParameters::shared_ptr gtsam::NonlinearOptimizerParams::iterativeParams |
The container for iterativeOptimization parameters. used in CG Solvers.
Definition at line 108 of file NonlinearOptimizerParams.h.
LinearSolverType gtsam::NonlinearOptimizerParams::linearSolverType = MULTIFRONTAL_CHOLESKY |
The type of linear solver to use in the nonlinear optimizer.
Definition at line 106 of file NonlinearOptimizerParams.h.
size_t gtsam::NonlinearOptimizerParams::maxIterations = 100 |
The maximum iterations to stop iterating (default 100)
Definition at line 41 of file NonlinearOptimizerParams.h.
boost::optional<Ordering> gtsam::NonlinearOptimizerParams::ordering |
The optional variable elimination ordering, or empty to use COLAMD (default: empty)
Definition at line 107 of file NonlinearOptimizerParams.h.
Ordering::OrderingType gtsam::NonlinearOptimizerParams::orderingType = Ordering::COLAMD |
The method of ordering use during variable elimination (default COLAMD)
Definition at line 46 of file NonlinearOptimizerParams.h.
double gtsam::NonlinearOptimizerParams::relativeErrorTol = 1e-5 |
The maximum relative error decrease to stop iterating (default 1e-5)
Definition at line 42 of file NonlinearOptimizerParams.h.
The printing verbosity during optimization (default SILENT)
Definition at line 45 of file NonlinearOptimizerParams.h.