44 switch (verbosityDL) {
47 default: s =
"UNDEFINED";
break;
57 DoglegState(
const Values& _values,
double _error,
double _delta,
unsigned int _iterations = 0)
68 graph,
std::unique_ptr<State>(
70 params_(ensureHasOrdering(params, graph)) {}
75 new State(initialValues, graph.
error(initialValues), 1.0))) {
80 return static_cast<const State*
>(
state_.get())->
delta;
110 throw std::runtime_error(
"Dogleg is not currently compatible with the linear conjugate gradient solver");
113 throw std::runtime_error(
"Optimization parameter is invalid: DoglegParams::elimination");
VerbosityDL verbosityDLTranslator(const std::string &verbosityDL) const
DoglegState(const Values &_values, double _error, double _delta, unsigned int _iterations=0)
bool isMultifrontal() const
const NonlinearFactorGraph & graph() const
return the graph with nonlinear factors
static Ordering Create(OrderingType orderingType, const FACTOR_GRAPH &graph)
void print(const std::string &str="VectorValues", const KeyFormatter &formatter=DefaultKeyFormatter) const
DoglegOptimizer(const NonlinearFactorGraph &graph, const Values &initialValues, const DoglegParams ¶ms=DoglegParams())
VerbosityDL verbosityDL
The verbosity level for Dogleg (default: SILENT), see also NonlinearOptimizerParams::verbosity.
static IterationResult Iterate(double delta, TrustRegionAdaptationMode mode, const VectorValues &dx_u, const VectorValues &dx_n, const M &Rd, const F &f, const VALUES &x0, const double f_error, const bool verbose=false)
Verbosity verbosity
The printing verbosity during optimization (default SILENT)
GaussianFactorGraph::shared_ptr iterate() override
bool isSequential() const
NonlinearFactorGraph graph
static enum @1107 ordering
static const SmartProjectionParams params
std::shared_ptr< GaussianFactorGraph > linearize(const Values &linearizationPoint) const
Linearize a nonlinear factor graph.
std::unique_ptr< internal::NonlinearOptimizerState > state_
PIMPL'd state.
VectorValues optimize() const
Nonlinear factor graph optimizer using Powell's Dogleg algorithm (detail implementation) ...
VectorValues optimize() const
VectorValues optimizeGradientSearch() const
double deltaInitial
The initial trust region radius (default: 10.0)
Linear Factor Graph where all factors are Gaussians.
EIGEN_DONT_INLINE void transform(const Transformation &t, Data &data)
std::shared_ptr< This > shared_ptr
shared_ptr to this class
GaussianFactorGraph::Eliminate getEliminationFunction() const
internal::DoglegState State
const DoglegParams & params() const
DoglegParams ensureHasOrdering(DoglegParams params, const NonlinearFactorGraph &graph) const
NonlinearFactorGraph graph_
The graph with nonlinear factors.
Private class for NonlinearOptimizer state.
VectorValues optimizeGradientSearch() const
Chordal Bayes Net, the result of eliminating a factor graph.
Ordering::OrderingType orderingType
The method of ordering use during variable elimination (default COLAMD)
std::optional< Ordering > ordering
The optional variable elimination ordering, or empty to use COLAMD (default: empty) ...
double error() const
return error in current optimizer state
Gaussian Bayes Tree, the result of eliminating a GaussianJunctionTree.