NDEVR
API Documentation
OptimizationAlgorithmGaussNewton< t_type >

Implementation of the Gauss Newton Algorithm. More...

Inheritance diagram for OptimizationAlgorithmGaussNewton< t_type >:
[legend]
Collaboration diagram for OptimizationAlgorithmGaussNewton< t_type >:
[legend]

Public Member Functions

 OptimizationAlgorithmGaussNewton ()
 construct the Gauss Newton algorithm, which use the given Solver for solving the linearized system.
void optimize (uint04 iterations, bool online, IndexScratch &scratch)
 Runs the Gauss-Newton optimization for the given number of iterations.
virtual OptimizationAlgorithm::SolverResult solve (int iteration, bool online, IndexScratch &scratch)
 Performs a single Gauss-Newton iteration.
Public Member Functions inherited from OptimizationAlgorithmWithHessian< t_type >
 OptimizationAlgorithmWithHessian ()
 Default constructor.
void addEdge (HyperGraph::HGEdge *e)
 Adds an edge to the optimizer.
void addVertex (HyperGraph::HGVertex &v)
 Adds a vertex to the optimizer.
bool buildLinearStructure (IndexScratch &scratch)
 Builds the linear system structure.
void clear ()
 Clears the solver state.
bool init (bool online=false)
 Initializes the solver, detecting whether Schur complement should be used.
SparseOptimizeroptimizer ()
 Returns a mutable reference to the underlying sparse optimizer.
void updateLinearSystem ()
 Rebuilds the linear system (Hessian and gradient) from the current graph state.
bool updateStructure (const Buffer< HyperGraph::HGVertex * > &vset, const Set< HyperGraph::HGVertex * > &edges)
 Updates the linear system structure after graph topology changes.

Additional Inherited Members

Public Types inherited from OptimizationAlgorithm
enum  SolverResult { Terminate =2 , OK =1 , Fail =-1 }
 Result codes returned by the solver after each iteration. More...
Public Attributes inherited from OptimizationAlgorithmWithHessian< t_type >
t_type solver
 The underlying solver instance.

Detailed Description

template<class t_type>
class OptimizationAlgorithmGaussNewton< t_type >

Implementation of the Gauss Newton Algorithm.

Definition at line 38 of file optimization_algorithm_gauss_newton.h.

Constructor & Destructor Documentation

◆ OptimizationAlgorithmGaussNewton()

template<class t_type>
OptimizationAlgorithmGaussNewton< t_type >::OptimizationAlgorithmGaussNewton ( )
inlineexplicit

construct the Gauss Newton algorithm, which use the given Solver for solving the linearized system.

Default constructor.

Definition at line 46 of file optimization_algorithm_gauss_newton.h.

Member Function Documentation

◆ optimize()

template<class t_type>
void OptimizationAlgorithmGaussNewton< t_type >::optimize ( uint04 iterations,
bool online,
IndexScratch & scratch )
inline

Runs the Gauss-Newton optimization for the given number of iterations.

Parameters
[in]iterationsMaximum number of iterations.
[in]onlineWhether this is an online (incremental) optimization.
[in]scratchScratch buffers for pose and landmark indices.

Definition at line 52 of file optimization_algorithm_gauss_newton.h.

References OptimizationAlgorithmWithHessian< t_solver >::init(), OptimizationAlgorithm::OK, OptimizationAlgorithmWithHessian< t_solver >::optimizer(), and solve().

◆ solve()

template<class t_type>
virtual OptimizationAlgorithm::SolverResult OptimizationAlgorithmGaussNewton< t_type >::solve ( int iteration,
bool online,
IndexScratch & scratch )
inlinevirtual

Performs a single Gauss-Newton iteration.

Parameters
[in]iterationCurrent iteration index.
[in]onlineWhether this is an online step.
[in]scratchScratch buffers for pose and landmark indices.
Returns
The solver result (OK, Fail, or Terminate).

Definition at line 73 of file optimization_algorithm_gauss_newton.h.

References SparseOptimizer::computeActiveErrors(), OptimizationAlgorithm::Fail, OptimizationAlgorithm::OK, OptimizationAlgorithmWithHessian< t_solver >::optimizer(), OptimizationAlgorithmWithHessian< t_solver >::solver, and SparseOptimizer::update().

Referenced by optimize().


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