Skip to main content

Optimizer

Trait Optimizer 

Source
pub trait Optimizer<T = f64>
where T: Float,
{ // Required method fn solve(&mut self, u: &mut [T]) -> Result<SolverStatus<T>, SolverError>; }
Expand description

A general optimizer

Required Methods§

Source

fn solve(&mut self, u: &mut [T]) -> Result<SolverStatus<T>, SolverError>

Solves a given problem and updates the initial estimate u with the solution.

Returns the solver status on success.

If the algorithm cannot proceed because a user callback fails, a projection fails, non-finite values are encountered, or an internal numerical/kernel inconsistency is detected, this method returns Err(SolverError).

Implementors§

Source§

impl<'life, GradientType, ConstraintType, CostType, T> Optimizer<T> for FBSOptimizer<'life, GradientType, ConstraintType, CostType, T>
where T: Float, GradientType: Fn(&[T], &mut [T]) -> FunctionCallResult + 'life, CostType: Fn(&[T], &mut T) -> FunctionCallResult + 'life, ConstraintType: Constraint<T> + 'life,

Source§

impl<'life, GradientType, ConstraintType, CostType, T> Optimizer<T> for PANOCOptimizer<'life, GradientType, ConstraintType, CostType, T>
where T: Float + LbfgsPrecision + Sum<T>, GradientType: Fn(&[T], &mut [T]) -> FunctionCallResult + 'life, CostType: Fn(&[T], &mut T) -> FunctionCallResult, ConstraintType: Constraint<T> + 'life,