Base for all nonlinear solvers. Defines the message interface that can be broadcasted to listeners. More...
#include <ikarus/solver/nonlinearsolver/nonlinearsolverbase.hh>
Public Types | |
| using | State = NonlinearSolverStateType< F > | 
| using | MessageType = NonLinearSolverMessages | 
| using | Callback = std::function< void(NonLinearSolverMessages, const State &)> | 
| using | Token = std::shared_ptr< Callback > | 
Public Member Functions | |
| 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... | |
| F | Type of the differentiable function to solve. | 
| Args | Additional message signatures can be broadcasted | 
      
  | 
  inherited | 
      
  | 
  inherited | 
| using Ikarus::NonlinearSolverBase< F, Args >::State = NonlinearSolverStateType<F> | 
      
  | 
  inherited | 
      
  | 
  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 | 
      
  | 
  inlineinherited |