gtsam  3.2.1
gtsam
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
gtsam::GaussNewtonOptimizer Class Reference

Detailed Description

This class performs Gauss-Newton nonlinear optimization.

+ Inheritance diagram for gtsam::GaussNewtonOptimizer:

Public Member Functions

Standard interface
 GaussNewtonOptimizer (const NonlinearFactorGraph &graph, const Values &initialValues, const GaussNewtonParams &params=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.
 
virtual void iterate ()
 Perform a single iteration, returning a new NonlinearOptimizer class containing the updated variable assignments, which may be retrieved with values().
 
const GaussNewtonParamsparams () const
 Read-only access the parameters.
 
GaussNewtonParamsparams ()
 Read/write access the parameters. More...
 
const GaussNewtonStatestate () const
 Read-only access the last state.
 
GaussNewtonStatestate ()
 Read/write access the last state. More...
 
- Public Member Functions inherited from gtsam::NonlinearOptimizer
virtual const Valuesoptimize ()
 Optimize for the maximum-likelihood estimate, returning a new NonlinearOptimizer class containing the optimized variable assignments, which may be retrieved with values(). More...
 
const ValuesoptimizeSafely ()
 Optimize, but return empty result if any uncaught exception is thrown Intended for MATLAB. More...
 
double error () const
 return error
 
int iterations () const
 return number of iterations
 
const Valuesvalues () const
 return values
 
virtual ~NonlinearOptimizer ()
 Virtual destructor.
 
virtual VectorValues solve (const GaussianFactorGraph &gfg, const Values &initial, const NonlinearOptimizerParams &params) const
 Default function to do linear solve, i.e. More...
 

Protected Member Functions

virtual const
NonlinearOptimizerParams
_params () const
 Access the parameters (base class version)
 
virtual const
NonlinearOptimizerState
_state () const
 Access the state (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)
 Constructor for initial construction of base classes. More...
 

Protected Attributes

GaussNewtonParams params_
 
GaussNewtonState state_
 
- Protected Attributes inherited from gtsam::NonlinearOptimizer
NonlinearFactorGraph graph_
 

Additional Inherited Members

- Public Types inherited from gtsam::NonlinearOptimizer
typedef boost::shared_ptr
< const NonlinearOptimizer
shared_ptr
 A shared pointer to this class.
 

Constructor & Destructor Documentation

gtsam::GaussNewtonOptimizer::GaussNewtonOptimizer ( const NonlinearFactorGraph graph,
const Values initialValues,
const GaussNewtonParams params = GaussNewtonParams() 
)
inline

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.

Parameters
graphThe nonlinear factor graph to optimize
initialValuesThe initial variable assignments
paramsThe optimization parameters
gtsam::GaussNewtonOptimizer::GaussNewtonOptimizer ( const NonlinearFactorGraph graph,
const Values initialValues,
const Ordering ordering 
)
inline

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.

Parameters
graphThe nonlinear factor graph to optimize
initialValuesThe initial variable assignments

Member Function Documentation

GaussNewtonParams& gtsam::GaussNewtonOptimizer::params ( )
inline

Read/write access the parameters.

GaussNewtonState& gtsam::GaussNewtonOptimizer::state ( )
inline

Read/write access the last state.

When modifying the state, the error, etc. must be consistent before calling iterate()


The documentation for this class was generated from the following files: