[−][src]Trait argmin_core::Solver
Associated Constants
Loading content...Required methods
fn next_iter(
&mut self,
op: &mut OpWrapper<O>,
state: &IterState<O>
) -> Result<ArgminIterData<O>, Error>
&mut self,
op: &mut OpWrapper<O>,
state: &IterState<O>
) -> Result<ArgminIterData<O>, Error>
Computes one iteration of the algorithm.
Provided methods
fn init(
&mut self,
_op: &mut OpWrapper<O>,
_state: &IterState<O>
) -> Result<Option<ArgminIterData<O>>, Error>
&mut self,
_op: &mut OpWrapper<O>,
_state: &IterState<O>
) -> Result<Option<ArgminIterData<O>>, Error>
Initializes the algorithm
This is executed before any iterations are performed. It can be used to perform precomputations. The default implementation corresponds to doing nothing.
fn terminate_internal(&mut self, state: &IterState<O>) -> TerminationReason
Checks whether basic termination reasons apply.
Terminate if
- algorithm was terminated somewhere else in the Executor
- iteration count exceeds maximum number of iterations
- cost is lower than target cost
This can be overwritten in a Solver
implementation; however it is not advised.
fn terminate(&mut self, _state: &IterState<O>) -> TerminationReason
Checks whether the algorithm must be terminated