gtsam
4.0.0
gtsam
|
This class performs Gauss-Newton nonlinear optimization.
Public Member Functions | |
Standard interface | |
GaussNewtonOptimizer (const NonlinearFactorGraph &graph, const Values &initialValues, const GaussNewtonParams ¶ms=GaussNewtonParams()) | |
Standard constructor, requires a nonlinear factor graph, initial variable assignments, and optimization parameters. More... | |
GaussNewtonOptimizer (const NonlinearFactorGraph &graph, const Values &initialValues, const Ordering &ordering) | |
Standard constructor, requires a nonlinear factor graph, initial variable assignments, and optimization parameters. More... | |
Advanced interface | |
virtual | ~GaussNewtonOptimizer () |
Virtual destructor. | |
GaussianFactorGraph::shared_ptr | iterate () override |
Perform a single iteration, returning GaussianFactorGraph corresponding to the linearized factor graph. | |
const GaussNewtonParams & | params () const |
Read-only access the parameters. | |
Public Member Functions inherited from gtsam::NonlinearOptimizer | |
virtual const Values & | optimize () |
Optimize for the maximum-likelihood estimate, returning a the optimized variable assignments. More... | |
const Values & | optimizeSafely () |
Optimize, but return empty result if any uncaught exception is thrown Intended for MATLAB. More... | |
double | error () const |
return error | |
size_t | iterations () const |
return number of iterations | |
const Values & | values () const |
return values | |
virtual | ~NonlinearOptimizer () |
Virtual destructor. | |
virtual VectorValues | solve (const GaussianFactorGraph &gfg, const NonlinearOptimizerParams ¶ms) const |
Default function to do linear solve, i.e. More... | |
Protected Member Functions | |
const NonlinearOptimizerParams & | _params () const override |
Access the parameters (base class version) | |
GaussNewtonParams | ensureHasOrdering (GaussNewtonParams params, const NonlinearFactorGraph &graph) const |
Internal function for computing a COLAMD ordering if no ordering is specified. | |
Protected Member Functions inherited from gtsam::NonlinearOptimizer | |
void | defaultOptimize () |
A default implementation of the optimization loop, which calls iterate() until checkConvergence returns true. | |
NonlinearOptimizer (const NonlinearFactorGraph &graph, std::unique_ptr< internal::NonlinearOptimizerState > state) | |
Constructor for initial construction of base classes. More... | |
Protected Attributes | |
GaussNewtonParams | params_ |
Protected Attributes inherited from gtsam::NonlinearOptimizer | |
NonlinearFactorGraph | graph_ |
The graph with nonlinear factors. | |
std::unique_ptr< internal::NonlinearOptimizerState > | state_ |
PIMPL'd state. | |
Additional Inherited Members | |
Public Types inherited from gtsam::NonlinearOptimizer | |
typedef boost::shared_ptr< const NonlinearOptimizer > | shared_ptr |
A shared pointer to this class. | |
gtsam::GaussNewtonOptimizer::GaussNewtonOptimizer | ( | const NonlinearFactorGraph & | graph, |
const Values & | initialValues, | ||
const GaussNewtonParams & | params = GaussNewtonParams() |
||
) |
Standard constructor, requires a nonlinear factor graph, initial variable assignments, and optimization parameters.
For convenience this version takes plain objects instead of shared pointers, but internally copies the objects.
graph | The nonlinear factor graph to optimize |
initialValues | The initial variable assignments |
params | The optimization parameters |
gtsam::GaussNewtonOptimizer::GaussNewtonOptimizer | ( | const NonlinearFactorGraph & | graph, |
const Values & | initialValues, | ||
const Ordering & | ordering | ||
) |
Standard constructor, requires a nonlinear factor graph, initial variable assignments, and optimization parameters.
For convenience this version takes plain objects instead of shared pointers, but internally copies the objects.
graph | The nonlinear factor graph to optimize |
initialValues | The initial variable assignments |