27 #include <boost/algorithm/string.hpp> 33 std::string
s =
verbosityDL; boost::algorithm::to_upper(s);
44 switch (verbosityDL) {
47 default: s =
"UNDEFINED";
break;
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");
static Ordering Create(OrderingType orderingType, const FACTOR_GRAPH &graph)
VectorValues optimizeGradientSearch() 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)
static enum @843 ordering
boost::shared_ptr< This > shared_ptr
shared_ptr to this class
const NonlinearFactorGraph & graph() const
return the graph with nonlinear factors
Verbosity verbosity
The printing verbosity during optimization (default SILENT)
VectorValues optimize() const
Solve the GaussianBayesNet, i.e. return , by back-substitution.
GaussianFactorGraph::shared_ptr iterate() override
VectorValues optimizeGradientSearch() const
NonlinearFactorGraph graph
std::unique_ptr< internal::NonlinearOptimizerState > state_
PIMPL'd state.
const DoglegParams & params() const
Nonlinear factor graph optimizer using Powell's Dogleg algorithm (detail implementation) ...
GaussianFactorGraph::Eliminate getEliminationFunction() const
boost::optional< Ordering > ordering
The optional variable elimination ordering, or empty to use COLAMD (default: empty) ...
double deltaInitial
The initial trust region radius (default: 10.0)
Linear Factor Graph where all factors are Gaussians.
static SmartStereoProjectionParams params
double error() const
return error in current optimizer state
bool isSequential() const
VerbosityDL verbosityDLTranslator(const std::string &verbosityDL) const
DoglegState(const Values &values, double error, double delta, unsigned int iterations=0)
internal::DoglegState State
NonlinearFactorGraph graph_
The graph with nonlinear factors.
Private class for NonlinearOptimizer state.
bool isMultifrontal() const
VectorValues optimize() const
Chordal Bayes Net, the result of eliminating a factor graph.
void print(const std::string &str="VectorValues", const KeyFormatter &formatter=DefaultKeyFormatter) const
Ordering::OrderingType orderingType
The method of ordering use during variable elimination (default COLAMD)
boost::shared_ptr< GaussianFactorGraph > linearize(const Values &linearizationPoint) const
Linearize a nonlinear factor graph.
Gaussian Bayes Tree, the result of eliminating a GaussianJunctionTree.
DoglegParams ensureHasOrdering(DoglegParams params, const NonlinearFactorGraph &graph) const