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 | ValueType = typename NLO::template ParameterValue< 0 > |
using | CorrectionType = typename NLO::DerivativeType |
Type of the correction of x += deltaX. More... | |
using | UpdateFunction = UF |
Type of the update function. More... | |
using | NonLinearOperator = NLO |
Type of the non-linear operator. More... | |
using | ScalarType = std::remove_cvref_t< typename NLO::template FunctionReturnType< 0 > > |
using | MatrixType = std::remove_cvref_t< typename NLO::template FunctionReturnType< 2 > > |
Type of the Hessian. More... | |
Public Member Functions | |
template<typename UF2 = UF> | |
TrustRegion (const NLO &nonLinearOperator, 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... | |
template<typename SolutionType = NoPredictor> requires std::is_same_v<SolutionType, NoPredictor> || std::is_convertible_v<SolutionType, CorrectionType> | |
NonLinearSolverInformation | solve (const SolutionType &dxPredictor=NoPredictor{}) |
Solves the nonlinear optimization problem using the TrustRegion algorithm. More... | |
auto & | nonLinearOperator () |
Access the nonlinear operator. More... | |
void | subscribe (NonLinearSolverMessages message, std::shared_ptr< IObserver< NonLinearSolverMessages > > observer) |
Subscribe an observer to receive notifications for a specific message type. More... | |
void | subscribeAll (std::shared_ptr< IObserver< NonLinearSolverMessages > > observer) |
Subscribe an observer to receive notifications for all message types. More... | |
void | subscribeAll (std::initializer_list< std::shared_ptr< IObserver< NonLinearSolverMessages > > > observers) |
Subscribe multiple observers to receive notifications for all message types. More... | |
void | unSubscribe (NonLinearSolverMessages message, std::shared_ptr< IObserver< NonLinearSolverMessages > > observer) |
Unsubscribe an observer from receiving notifications for a specific message type. More... | |
void | unSubscribeAll (std::shared_ptr< IObserver< NonLinearSolverMessages > > observer) |
Unsubscribe an observer from receiving notifications for all message types. More... | |
void | notify (NonLinearSolverMessages message) |
Notify observers about a specific message type. More... | |
void | notify (NonLinearSolverMessages message, ScalarType val) |
Notify observers about a specific message type with a floating-point value. More... | |
void | notify (NonLinearSolverMessages message, int val) |
Notify observers about a specific message type with an integer value. More... | |
void | notify (NonLinearSolverMessages message, const std::string &val) |
Notify observers about a specific message type with a string value. More... | |
void | notify (NonLinearSolverMessages message, int val1, double val2) |
Notify observers about a specific message type with an integer and a double value. More... | |
void | notify (NonLinearSolverMessages message, int val1, const std::string &val2) |
Notify observers about a specific message type with an integer value and a string value. More... | |
void | notify (NonLinearSolverMessages message, Eigen::VectorX< ScalarType > vec) |
Notify observers about a specific message type with an Eigen::VectorX. More... | |
void | notify (MT message) |
void | notify (MT message, ScalarType val) |
void | notify (MT message, int val) |
void | notify (MT message, const std::string &val) |
void | notify (MT message, int val1, double val2) |
void | notify (MT message, int val1, const std::string &val2) |
void | notify (MT message, Eigen::VectorX< ScalarType > vec) |
Refer to [2] for details of the algorithm.
This code is heavily inspired by the trust-region implementation of Manopt.
NLO | Type of the nonlinear operator to solve. |
preConditioner | Type of preconditioner to use (default is IncompleteCholesky). |
UF | Type of the update function |
using Ikarus::TrustRegion< NLO, preConditioner, UF >::CorrectionType = typename NLO::DerivativeType |
using Ikarus::TrustRegion< NLO, preConditioner, UF >::MatrixType = std::remove_cvref_t<typename NLO::template FunctionReturnType<2> > |
using Ikarus::TrustRegion< NLO, preConditioner, UF >::NonLinearOperator = NLO |
using Ikarus::TrustRegion< NLO, preConditioner, UF >::ScalarType = std::remove_cvref_t<typename NLO::template FunctionReturnType<0> > |
Type of the scalar cost
using Ikarus::TrustRegion< NLO, preConditioner, UF >::Settings = TRSettings |
using Ikarus::TrustRegion< NLO, preConditioner, UF >::UpdateFunction = UF |
using Ikarus::TrustRegion< NLO, preConditioner, UF >::ValueType = typename NLO::template ParameterValue<0> |
Type of the parameter vector of the nonlinear operator
|
inlineexplicit |
nonLinearOperator | Nonlinear operator to solve. |
updateFunction | Update function |
|
inline |
|
inherited |
|
inherited |
|
inherited |
|
inherited |
|
inherited |
|
inherited |
|
inherited |
|
inherited |
message | The message type to notify about. |
|
inherited |
message | The message type to notify about. |
val | The string value to be sent with the notification. |
|
inherited |
ScalarType | The type of the elements in the Eigen::VectorX. |
message | The message type to notify about. |
vec | The Eigen::VectorX to be sent with the notification. |
|
inherited |
message | The message type to notify about. |
val | The integer value to be sent with the notification. |
|
inherited |
message | The message type to notify about. |
val1 | The integer value to be sent with the notification. |
val2 | The string value to be sent with the notification. |
|
inherited |
message | The message type to notify about. |
val1 | The integer value to be sent with the notification. |
val2 | The double value to be sent with the notification. |
|
inherited |
ScalarType | The type of the floating-point value. |
message | The message type to notify about. |
val | The floating-point value to be sent with the notification. |
|
inline |
p_settings | TrustRegionSettings containing the solver configuration. |
|
inline |
SolutionType | Type of the solution predictor (default is NoPredictor). |
dxPredictor | Solution predictor. |
|
inherited |
message | The message type to subscribe to. |
observer | The observer to be subscribed. |
|
inherited |
observers | List of observers to be subscribed. |
|
inherited |
observer | The observer to be subscribed. |
|
inherited |
message | The message type to unsubscribe from. |
observer | The observer to be unsubscribed. |
|
inherited |
observer | The observer to be unsubscribed. |