29 typedef internal::NonlinearOptimizerState
State;
41 return linear->gradientAtZero();
46 :
Base(graph,
std::unique_ptr<State>(new State(initialValues, graph.
error(initialValues)))),
54 const State &state)
const {
59 const State ¤t,
const double alpha,
const Gradient &
g)
const {
68 boost::tie(newValues, dummy) = nonlinearConjugateGradient<System, Values>(
81 boost::tie(newValues, iterations) =
def step(data, isam, result, truth, currPoseIndex)
A non-templated config holding any types of Manifold-group elements.
boost::shared_ptr< This > shared_ptr
shared_ptr to this class
boost::tuple< V, int > nonlinearConjugateGradient(const S &system, const V &initial, const NonlinearOptimizerParams ¶ms, const bool singleIteration, const bool gradientDescent=false)
const Values & optimize() override
Values retract(const VectorValues &delta) const
double error(const State &state) const
NonlinearFactorGraph graph
void g(const string &key, int i)
std::unique_ptr< internal::NonlinearOptimizerState > state_
PIMPL'd state.
GaussianFactorGraph::shared_ptr iterate() override
Linear Factor Graph where all factors are Gaussians.
static SmartStereoProjectionParams params
internal::DoglegState State
NonlinearConjugateGradientOptimizer(const NonlinearFactorGraph &graph, const Values &initialValues, const Parameters ¶ms=Parameters())
Constructor.
static VectorValues gradientInPlace(const NonlinearFactorGraph &nfg, const Values &values)
Return the gradient vector of a nonlinear factor graph.
NonlinearFactorGraph graph_
The graph with nonlinear factors.
Private class for NonlinearOptimizer state.
State advance(const State ¤t, const double alpha, const Gradient &g) const
double error(const Values &values) const
Gradient gradient(const State &state) const
boost::shared_ptr< GaussianFactorGraph > linearize(const Values &linearizationPoint) const
Linearize a nonlinear factor graph.
Simple non-linear optimizer that solves using non-preconditioned CG.
size_t iterations() const
return number of iterations in current optimizer state