|
tinyopt 700
Tinyopt, a lightweight, header only optimization library
|
Public Types | |
| using | Scalar = _Scalar |
Public Member Functions | |
| SolverBase (const Options &options={}) | |
| template<typename Grad_t> | |
| bool | Clamp (Grad_t &g, Scalar minmax) const |
| Clamp the gradient 'g' to within [-minmax, minmax], if minmax is not 0. Returns true if 'g' was clamped. | |
| void | NormalizeCost (Cost &cost) |
| Eventually normalize the cost. | |
| virtual std::optional< Vector< Scalar, Dims > > | Solve () const =0 |
| Solve the linear system dx = -H^-1 * grad, returns nullopt on failure. | |
| virtual void | GoodStep (Scalar=0.0f) |
| virtual void | BadStep (Scalar=0.0f) |
| virtual void | FailedStep () |
| virtual void | Rebuild (bool) |
| virtual std::string | stateAsString () const |
| virtual Index | dims () const =0 |
| const Cost & | cost () const |
Static Public Attributes | |
| static constexpr Index | Dims = _Dims |
Protected Attributes | |
| const Options | options_ |
| Cost | cost_ |
|
inlinevirtual |
Reimplemented in tinyopt::solvers::SolverLM< Hessian_t >, and tinyopt::solvers::SolverLM< Hessian_t >.
|
inlinevirtual |
Reimplemented in tinyopt::solvers::SolverLM< Hessian_t >, and tinyopt::solvers::SolverLM< Hessian_t >.
|
pure virtual |
Solve the linear system dx = -H^-1 * grad, returns nullopt on failure.
Implemented in tinyopt::solvers::SolverBFGS< Gradient_t >, tinyopt::solvers::SolverBFGS< Gradient_t >, tinyopt::solvers::SolverCG< Gradient_t >, tinyopt::solvers::SolverCG< Gradient_t >, tinyopt::solvers::SolverDogLeg< Hessian_t >, tinyopt::solvers::SolverDogLeg< Hessian_t >, tinyopt::solvers::SolverGD< Gradient_t >, tinyopt::solvers::SolverGD< Gradient_t >, tinyopt::solvers::SolverGD< Hessian_t >, tinyopt::solvers::SolverGD< VecX >, tinyopt::solvers::SolverGN< Hessian_t >, tinyopt::solvers::SolverGN< Hessian_t >, tinyopt::solvers::SolverGN< MatX >, tinyopt::solvers::SolverLBFGS< Gradient_t, HistoryCapacity >, tinyopt::solvers::SolverLBFGS< Gradient_t, HistoryCapacity >, tinyopt::solvers::SolverLM< Hessian_t >, and tinyopt::solvers::SolverLM< Hessian_t >.