Trust Region solver for non-linear optimization problems. More...
#include <ikarus/solver/nonlinearsolver/trustregion.hh>
Public Types | |
| using | Settings = TRSettings |
| Type of the settings for the TrustRegion solver. More... | |
| using | FTraits = typename F::Traits |
| using | Domain = typename FTraits::Domain |
| Type of the parameter vector of. More... | |
| using | CorrectionType = typename FTraits::template Range< 1 > |
| Type of the correction of x += deltaX. More... | |
| using | UpdateFunction = UF |
| Type of the update function. More... | |
| using | DifferentiableFunction = F |
| Type of function to minimize. More... | |
| using | EnergyType = typename FTraits::template Range< 0 > |
| Type of the scalar cost. More... | |
| using | GradientType = typename FTraits::template Range< 1 > |
| Type of the gradient vector. More... | |
| using | HessianType = typename FTraits::template Range< 2 > |
| Type of the Hessian matrix. More... | |
| using | State = NonlinearSolverStateType< F > |
| using | MessageType = NonLinearSolverMessages |
| using | Callback = std::function< void(NonLinearSolverMessages, const State &)> |
| using | Token = std::shared_ptr< Callback > |
Public Member Functions | |
| template<typename UF2 = UF> | |
| TrustRegion (const F &f, UF2 &&updateFunction={}) | |
| Constructs a TrustRegion solver instance. More... | |
| void | setup (const Settings &settings) |
| Sets up the TrustRegion solver with the provided settings and checks feasibility. More... | |
| NonLinearSolverInformation | solve (Domain &x) |
| Solves the nonlinear optimization problem using the TrustRegion algorithm. More... | |
| auto & | energy () |
| Access the energy function. More... | |
| auto | residual () |
| Access the residual. More... | |
| Token | registerListener (Callback callback) |
| This method is used to register a Listener function. More... | |
| void | unregisterListener (Token token) |
| deregisters a specific function More... | |
| void | notify (NonLinearSolverMessages message, const State &data) |
| This calls all the registered functions. More... | |
Refer to [5] for details of the algorithm.
This code is heavily inspired by the trust-region implementation of Manopt.
| F | Type of the differentiable function to solve. |
| preConditioner | Type of preconditioner to use (default is IncompleteCholesky). |
| UF | Type of the update function |
|
inherited |
| using Ikarus::TrustRegion< F, preConditioner, UF >::CorrectionType = typename FTraits::template Range<1> |
| using Ikarus::TrustRegion< F, preConditioner, UF >::DifferentiableFunction = F |
| using Ikarus::TrustRegion< F, preConditioner, UF >::Domain = typename FTraits::Domain |
| using Ikarus::TrustRegion< F, preConditioner, UF >::EnergyType = typename FTraits::template Range<0> |
| using Ikarus::TrustRegion< F, preConditioner, UF >::FTraits = typename F::Traits |
| using Ikarus::TrustRegion< F, preConditioner, UF >::GradientType = typename FTraits::template Range<1> |
| using Ikarus::TrustRegion< F, preConditioner, UF >::HessianType = typename FTraits::template Range<2> |
|
inherited |
| using Ikarus::TrustRegion< F, preConditioner, UF >::Settings = TRSettings |
|
inherited |
|
inherited |
| using Ikarus::TrustRegion< F, preConditioner, UF >::UpdateFunction = UF |
|
inlineexplicit |
| f | Function to solve. |
| updateFunction | Update function |
|
inline |
|
inlineinherited |
|
inlineinherited |
The function that is passed in is first stored in a shared_ptr. After this, the shared_ptr is added to the vector of listener functions, which leads to a implicit conversion to a weak_ptr. The shared_ptr is then returned to the Listener that has called this function to be stored in a vector of shared_ptr<void> listener.hh.
| callback | the callback function |
|
inline |
|
inline |
| p_settings | TrustRegionSettings containing the solver configuration. |
|
inline |
| x | the solution. |
|
inlineinherited |