Momentum
A library for solving nonlinear optimization problems related to human body kinematics
Loading...
Searching...
No Matches
momentum::GaussNewtonSolverOptions Struct Reference

Extended options specific to the Gauss-Newton optimization algorithm. More...

#include <gauss_newton_solver.h>

Inheritance diagram for momentum::GaussNewtonSolverOptions:

Public Member Functions

 GaussNewtonSolverOptions ()=default
 Default constructor.
 GaussNewtonSolverOptions (const SolverOptions &baseOptions)
 Construct from base solver options while preserving Gauss-Newton defaults.
Public Member Functions inherited from momentum::GaussNewtonSolverBaseOptions
 GaussNewtonSolverBaseOptions ()=default
 Default constructor.
 GaussNewtonSolverBaseOptions (const SolverOptions &baseOptions)
 Construct from base solver options while preserving Gauss-Newton defaults.
Public Member Functions inherited from momentum::SolverOptions
virtual ~SolverOptions ()=default
 Virtual destructor for polymorphic behavior.

Public Attributes

bool useBlockJtJ = false
 Uses pre-computed JᵀJ and JᵀR from the solver function.
size_t targetRowsPerChunk = SIZE_MAX
 Target number of Jacobian rows to accumulate before computing JᵀJ.
Public Attributes inherited from momentum::GaussNewtonSolverBaseOptions
float regularization = 0.05f
 Damping parameter added to Hessian diagonal for numerical stability; see https://en.wikipedia.org/wiki/Levenberg%E2%80%93Marquardt_algorithm.
bool doLineSearch = false
 Enables backtracking line search to ensure error reduction at each step.
Public Attributes inherited from momentum::SolverOptions
size_t minIterations = 1
 Minimum number of iterations before checking convergence criteria.
size_t maxIterations = 2
 Maximum number of iterations before terminating.
float threshold = 1.0f
 Convergence threshold for relative error change.
bool verbose = false
 Enable detailed logging during optimization.

Detailed Description

Extended options specific to the Gauss-Newton optimization algorithm.

Definition at line 36 of file gauss_newton_solver.h.

Constructor & Destructor Documentation

◆ GaussNewtonSolverOptions() [1/2]

momentum::GaussNewtonSolverOptions::GaussNewtonSolverOptions ( )
default

Default constructor.

◆ GaussNewtonSolverOptions() [2/2]

momentum::GaussNewtonSolverOptions::GaussNewtonSolverOptions ( const SolverOptions & baseOptions)
inline

Construct from base solver options while preserving Gauss-Newton defaults.

Definition at line 57 of file gauss_newton_solver.h.

References momentum::GaussNewtonSolverBaseOptions::GaussNewtonSolverBaseOptions().

Member Data Documentation

◆ targetRowsPerChunk

size_t momentum::GaussNewtonSolverOptions::targetRowsPerChunk = SIZE_MAX

Target number of Jacobian rows to accumulate before computing JᵀJ.

Controls the trade-off between memory usage and computational efficiency:

  • SIZE_MAX (default): Build full Jacobian, single JᵀJ multiplication (fastest, most memory)
  • 0: Process each error function block separately (slowest, minimum memory)
  • Other values: Group blocks via bin-packing up to this row count

Note: The effective minimum is the largest single block size, since we can't split individual error function blocks.

Definition at line 51 of file gauss_newton_solver.h.

Referenced by momentum::GaussNewtonSolverT< T >::GaussNewtonSolverT().

◆ useBlockJtJ

bool momentum::GaussNewtonSolverOptions::useBlockJtJ = false

Uses pre-computed JᵀJ and JᵀR from the solver function.

Can improve performance for problems with specialized structure

Definition at line 40 of file gauss_newton_solver.h.

Referenced by momentum::GaussNewtonSolverT< T >::GaussNewtonSolverT(), and momentum::PoseTransformSolverT< T >::PoseTransformSolverT().


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