Trait Optimizer

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

A general optimizer

Required Methods§

Source

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

solves a given problem and updates the initial estimate u with the solution

Returns the solver status

Implementors§

Source§

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

Source§

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