#include <NonlinearOptimizerParams.h>
|
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
} |
|
The common parameters for Nonlinear optimizers. Most optimizers deriving from NonlinearOptimizer also subclass the parameters.
Definition at line 35 of file NonlinearOptimizerParams.h.
◆ IterationHook
Type for an optional user-provided hook to be called after each internal optimizer iteration. See iterationHook below.
Definition at line 69 of file NonlinearOptimizerParams.h.
◆ LinearSolverType
◆ Verbosity
◆ NonlinearOptimizerParams()
gtsam::NonlinearOptimizerParams::NonlinearOptimizerParams |
( |
| ) |
|
|
default |
◆ ~NonlinearOptimizerParams()
virtual gtsam::NonlinearOptimizerParams::~NonlinearOptimizerParams |
( |
| ) |
|
|
inlinevirtual |
◆ equals()
◆ getAbsoluteErrorTol()
double gtsam::NonlinearOptimizerParams::getAbsoluteErrorTol |
( |
| ) |
const |
|
inline |
◆ getEliminationFunction()
◆ getErrorTol()
double gtsam::NonlinearOptimizerParams::getErrorTol |
( |
| ) |
const |
|
inline |
◆ getLinearSolverType()
std::string gtsam::NonlinearOptimizerParams::getLinearSolverType |
( |
| ) |
const |
|
inline |
◆ getMaxIterations()
size_t gtsam::NonlinearOptimizerParams::getMaxIterations |
( |
| ) |
const |
|
inline |
◆ getOrderingType()
std::string gtsam::NonlinearOptimizerParams::getOrderingType |
( |
| ) |
const |
|
inline |
◆ getRelativeErrorTol()
double gtsam::NonlinearOptimizerParams::getRelativeErrorTol |
( |
| ) |
const |
|
inline |
◆ getVerbosity()
std::string gtsam::NonlinearOptimizerParams::getVerbosity |
( |
| ) |
const |
|
inline |
◆ isCholmod()
bool gtsam::NonlinearOptimizerParams::isCholmod |
( |
| ) |
const |
|
inline |
◆ isIterative()
bool gtsam::NonlinearOptimizerParams::isIterative |
( |
| ) |
const |
|
inline |
◆ isMultifrontal()
bool gtsam::NonlinearOptimizerParams::isMultifrontal |
( |
| ) |
const |
|
inline |
◆ isSequential()
bool gtsam::NonlinearOptimizerParams::isSequential |
( |
| ) |
const |
|
inline |
◆ linearSolverTranslator() [1/2]
std::string gtsam::NonlinearOptimizerParams::linearSolverTranslator |
( |
LinearSolverType |
linearSolverType | ) |
const |
|
private |
◆ linearSolverTranslator() [2/2]
◆ orderingTypeTranslator() [1/2]
◆ orderingTypeTranslator() [2/2]
Ordering::OrderingType gtsam::NonlinearOptimizerParams::orderingTypeTranslator |
( |
const std::string & |
type | ) |
const |
|
private |
◆ print()
void gtsam::NonlinearOptimizerParams::print |
( |
const std::string & |
str = "" | ) |
const |
|
virtual |
◆ setAbsoluteErrorTol()
void gtsam::NonlinearOptimizerParams::setAbsoluteErrorTol |
( |
double |
value | ) |
|
|
inline |
◆ setErrorTol()
void gtsam::NonlinearOptimizerParams::setErrorTol |
( |
double |
value | ) |
|
|
inline |
◆ setIterativeParams()
◆ setLinearSolverType()
void gtsam::NonlinearOptimizerParams::setLinearSolverType |
( |
const std::string & |
solver | ) |
|
|
inline |
◆ setMaxIterations()
void gtsam::NonlinearOptimizerParams::setMaxIterations |
( |
int |
value | ) |
|
|
inline |
◆ setOrdering()
void gtsam::NonlinearOptimizerParams::setOrdering |
( |
const Ordering & |
ordering | ) |
|
|
inline |
◆ setOrderingType()
void gtsam::NonlinearOptimizerParams::setOrderingType |
( |
const std::string & |
ordering | ) |
|
|
inline |
◆ setRelativeErrorTol()
void gtsam::NonlinearOptimizerParams::setRelativeErrorTol |
( |
double |
value | ) |
|
|
inline |
◆ setVerbosity()
void gtsam::NonlinearOptimizerParams::setVerbosity |
( |
const std::string & |
src | ) |
|
|
inline |
◆ verbosityTranslator() [1/2]
◆ verbosityTranslator() [2/2]
std::string gtsam::NonlinearOptimizerParams::verbosityTranslator |
( |
Verbosity |
value | ) |
|
|
static |
◆ absoluteErrorTol
double gtsam::NonlinearOptimizerParams::absoluteErrorTol = 1e-5 |
◆ errorTol
double gtsam::NonlinearOptimizerParams::errorTol = 0.0 |
◆ 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:
void(size_t iteration, double errorBefore, double errorAfter)
which allows binding by means of a reference to a regular function:
void foo(
size_t iteration,
double errorBefore,
double errorAfter);
lmOpts.iterationHook = &
foo;
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.):
lmOpts.iterationHook = [&](
size_t iter,
double oldError,
double newError)
{
};
or to the result of a properly-formed std::bind
call.
Definition at line 95 of file NonlinearOptimizerParams.h.
◆ iterativeParams
◆ linearSolverType
◆ maxIterations
size_t gtsam::NonlinearOptimizerParams::maxIterations = 100 |
◆ ordering
std::optional<Ordering> gtsam::NonlinearOptimizerParams::ordering |
◆ orderingType
◆ relativeErrorTol
double gtsam::NonlinearOptimizerParams::relativeErrorTol = 1e-5 |
◆ verbosity
The documentation for this class was generated from the following files: