pub trait ArgminSolver: ArgminNextIter {
Show 27 methods fn apply(
        &mut self,
        _: &<Self as ArgminNextIter>::Parameters
    ) -> Result<<Self as ArgminNextIter>::OperatorOutput, Error>; fn gradient(
        &mut self,
        _: &<Self as ArgminNextIter>::Parameters
    ) -> Result<<Self as ArgminNextIter>::Parameters, Error>; fn hessian(
        &mut self,
        _: &<Self as ArgminNextIter>::Parameters
    ) -> Result<<Self as ArgminNextIter>::Hessian, Error>; fn modify(
        &mut self,
        _: &<Self as ArgminNextIter>::Parameters,
        _: f64
    ) -> Result<<Self as ArgminNextIter>::Parameters, Error>; fn cur_param(&self) -> <Self as ArgminNextIter>::Parameters; fn cur_grad(&self) -> <Self as ArgminNextIter>::Parameters; fn cur_hessian(&self) -> <Self as ArgminNextIter>::Hessian; fn set_cur_param(&mut self, _: <Self as ArgminNextIter>::Parameters); fn set_cur_grad(&mut self, _: <Self as ArgminNextIter>::Parameters); fn set_cur_hessian(&mut self, _: <Self as ArgminNextIter>::Hessian); fn set_best_param(&mut self, _: <Self as ArgminNextIter>::Parameters); fn run(
        &mut self
    ) -> Result<ArgminResult<<Self as ArgminNextIter>::Parameters>, Error>; fn run_fast(
        &mut self
    ) -> Result<ArgminResult<<Self as ArgminNextIter>::Parameters>, Error>; fn result(&self) -> ArgminResult<<Self as ArgminNextIter>::Parameters>; fn set_termination_reason(&mut self, _: TerminationReason); fn terminate(&mut self) -> TerminationReason; fn set_max_iters(&mut self, _: u64); fn max_iters(&self) -> u64; fn cur_iter(&self) -> u64; fn cur_cost(&self) -> f64; fn set_cur_cost(&mut self, _: f64); fn best_cost(&self) -> f64; fn set_best_cost(&mut self, _: f64); fn set_target_cost(&mut self, _: f64); fn add_logger(&mut self, _: Box<dyn ArgminLog>); fn add_writer(&mut self, _: Box<dyn ArgminWrite<Param = Self::Parameters>>); fn base_reset(&mut self);
}
Expand description

Defines the interface to a solver. Usually, there is no need to implement this manually, use the argmin_derive crate instead.

Required Methods

apply cost function or operator to a parameter vector

compute the gradient for a parameter vector

compute the hessian for a parameter vector

modify the parameter vector

return current parameter vector

return current gradient

return current gradient

set current parameter vector

set current gradient

set current gradient

set current parameter vector

Execute the optimization algorithm.

Execute the optimization algorithm without Ctrl-C handling, logging, writing and anything else which may cost unnecessary time.

Returns the best solution found during optimization.

Set termination reason (doesn’t terminate yet! – this is helpful for terminating within the iterations)

Evaluate all stopping criterions and return the TerminationReason

Set max number of iterations.

Get max number of iterations.

Get current iteration number.

Get current cost function value

Get current cost function value

Get best cost function value

set best cost value

Set the target cost function value which is used as a stopping criterion

Add a logger to the array of loggers

Add a writer to the array of writers

Reset the base of the algorithm to its initial state

Implementors