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§
Sourcefn solve(&mut self, u: &mut [T]) -> Result<SolverStatus<T>, SolverError>
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).