pub trait ArgminLineSearch: ArgminSolver {
    fn set_initial_parameter(&mut self, _: <Self as ArgminNextIter>::Parameters);
    fn set_search_direction(&mut self, _: <Self as ArgminNextIter>::Parameters);
    fn set_initial_alpha(&mut self, _: f64) -> Result<(), Error>;
    fn set_initial_cost(&mut self, _: f64);
    fn set_initial_gradient(&mut self, _: <Self as ArgminNextIter>::Parameters);
    fn calc_initial_cost(&mut self) -> Result<(), Error>;
    fn calc_initial_gradient(&mut self) -> Result<(), Error>;
}
Expand description

Defines a common interface to line search methods. Requires that ArgminSolver is implemented for the line search method as well.

The cost function value and the gradient at the starting point can either be provided (set_initial_cost and set_initial_gradient) or they can be computed using the operator from the implementation of ArgminSolver (see calc_initial_cost and calc_initial_gradient). The former is convenient if cost and gradient at the starting point are already known for some reason (i.e. the solver which uses the line search has already computed cost and gradient) and avoids unneccessary computation of those values.

Required Methods

Set the initial parameter (starting point)

Set the search direction

Set the initial step length

Set the cost function value at the starting point as opposed to computing it (see calc_initial_cost)

Set the gradient at the starting point as opposed to computing it (see calc_initial_gradient)

calculate the initial cost function value using an operator as opposed to setting it manually (see set_initial_cost)

calculate the initial gradient using an operator as opposed to setting it manually (see set_initial_gradient)

Implementors