26 typedef internal::NonlinearOptimizerState
State;
30 const Values& initialValues,
33 graph,
std::unique_ptr<State>(new State(initialValues, graph.
error(initialValues)))),
34 params_(ensureHasOrdering(params, graph)) {}
39 graph,
std::unique_ptr<State>(new State(initialValues, graph.
error(initialValues)))) {
45 gttic(GaussNewtonOptimizer_Iterate);
48 gttic(GaussNewtonOptimizer_Linearize);
50 gttoc(GaussNewtonOptimizer_Linearize);
53 gttic(GaussNewtonOptimizer_Solve);
55 gttoc(GaussNewtonOptimizer_Solve);
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
Verbosity verbosity
The printing verbosity during optimization (default SILENT)
NonlinearFactorGraph graph
static enum @1107 ordering
const GaussNewtonParams & params() const
GaussNewtonParams ensureHasOrdering(GaussNewtonParams params, const NonlinearFactorGraph &graph) const
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.
Linear Factor Graph where all factors are Gaussians.
std::shared_ptr< This > shared_ptr
shared_ptr to this class
double error(const Values &values) const
internal::DoglegState State
virtual VectorValues solve(const GaussianFactorGraph &gfg, const NonlinearOptimizerParams ¶ms) const
GaussianFactorGraph::shared_ptr iterate() override
GaussNewtonParams params_
NonlinearFactorGraph graph_
The graph with nonlinear factors.
Private class for NonlinearOptimizer state.
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
GaussNewtonOptimizer(const NonlinearFactorGraph &graph, const Values &initialValues, const GaussNewtonParams ¶ms=GaussNewtonParams())