|
Momentum
A library for solving nonlinear optimization problems related to human body kinematics
|
Shared base class for sequence solvers. More...
#include <sequence_solver_base.h>
Public Member Functions | |
| SequenceSolverBaseT (const SolverOptions &options, SequenceSolverFunctionT< T > *function) | |
| void | setOptions (const SolverOptions &options) override |
| Updates solver configuration with new options. | |
| void | setEnabledParameters (const ParameterSet ¶meters) final |
| Specifies which parameters should be optimized. | |
| Public Member Functions inherited from momentum::SolverT< T > | |
| SolverT (const SolverOptions &options, SolverFunctionT< T > *solver) | |
| Constructor with solver options and function to optimize. | |
| virtual | ~SolverT ()=default |
| virtual std::string_view | getName () const =0 |
| Returns the name of the solver implementation. | |
| double | solve (Eigen::VectorX< T > ¶ms) |
| Solves the optimization problem. | |
| const ParameterSet & | getActiveParameters () const |
| Returns the current set of enabled parameters. | |
| void | setParameters (const Eigen::VectorX< T > ¶ms) |
| Sets the current parameter values without solving. | |
| void | setStoreHistory (bool b) |
| Controls whether to store iteration history for debugging and analysis. | |
| const std::unordered_map< std::string, Eigen::MatrixX< T > > & | getHistory () const |
| Returns the history of the solver's iterations. | |
| size_t | getMinIterations () const |
| Returns the minimum number of iterations before checking convergence. | |
| size_t | getMaxIterations () const |
| Returns the maximum number of iterations before terminating. | |
| size_t | getNumParameters () const |
| const std::vector< double > & | getErrorHistory () const |
| Returns the history of objective function values over the iterations of the solve. | |
Protected Attributes | |
| float | regularization_ = 0.05f |
| bool | doLineSearch_ = false |
| bool | multithreaded_ = false |
| bool | progressBar_ = false |
| size_t | bandwidth_ = 0 |
| Protected Attributes inherited from momentum::SolverT< T > | |
| size_t | numParameters_ |
| Total number of parameters in the optimization problem. | |
| SolverFunctionT< T > * | solverFunction_ |
| Function to be optimized. | |
| Eigen::VectorX< T > | parameters_ |
| Current parameter values. | |
| ParameterSet | activeParameters_ |
| Bitset indicating which parameters are enabled for optimization. | |
| int | actualParameters_ |
| Number of parameters currently enabled for optimization. | |
| bool | newParameterPattern_ |
| Flag indicating parameter structure has changed. | |
| size_t | iteration_ {} |
| Current iteration count. | |
| double | error_ {} |
| Current objective function value. | |
| double | lastError_ {} |
| Previous iteration's objective function value. | |
| bool | storeHistory = false |
| Whether to record optimization progress for analysis. | |
| std::unordered_map< std::string, Eigen::MatrixX< T > > | iterationHistory_ |
| Recorded data from optimization process. | |
| std::vector< double > | errorHistory_ |
| History of objective function values over the iterations. | |
| bool | verbose_ = false |
| Whether to output detailed progress information. | |
Additional Inherited Members | |
| Protected Member Functions inherited from momentum::SolverT< T > | |
| virtual void | initializeSolver ()=0 |
| Initializes solver state before optimization begins. | |
| virtual void | doIteration ()=0 |
| Performs a single iteration of the optimization algorithm. | |
Shared base class for sequence solvers.
Definition at line 78 of file sequence_solver_base.h.
|
inline |
Definition at line 80 of file sequence_solver_base.h.
Referenced by momentum::SequenceCholeskySolverT< T >::SequenceCholeskySolverT(), and momentum::SequenceSolverT< T >::SequenceSolverT().
|
inlinefinalvirtual |
Specifies which parameters should be optimized.
| parameters | Bitset where each bit indicates if the corresponding parameter is enabled |
Reimplemented from momentum::SolverT< T >.
Definition at line 101 of file sequence_solver_base.h.
Referenced by momentum::trackSequence().
|
inlineoverridevirtual |
Updates solver configuration with new options.
Reimplemented from momentum::SolverT< T >.
Reimplemented in momentum::SequenceSolverT< T >, momentum::SequenceSolverT< double >, and momentum::SequenceSolverT< float >.
Definition at line 85 of file sequence_solver_base.h.
Referenced by momentum::SequenceSolverBaseT< float >::SequenceSolverBaseT(), momentum::SequenceCholeskySolverT< T >::setOptions(), and momentum::SequenceSolverT< T >::setOptions().
|
protected |
Definition at line 113 of file sequence_solver_base.h.
Referenced by momentum::SequenceCholeskySolverT< T >::initializeSolver(), and momentum::SequenceSolverT< T >::initializeSolver().
|
protected |
Definition at line 108 of file sequence_solver_base.h.
Referenced by momentum::SequenceSolverT< T >::doIteration().
|
protected |
Definition at line 109 of file sequence_solver_base.h.
Referenced by momentum::SequenceSolverT< T >::doIteration().
|
protected |
Definition at line 110 of file sequence_solver_base.h.
Referenced by momentum::SequenceSolverT< T >::doIteration().
|
protected |
Definition at line 107 of file sequence_solver_base.h.