pub trait Optimizer: Send + Sync {
// Required methods
fn name(&self) -> &'static str;
fn derivatives(&self) -> Derivatives;
fn minimize(
&self,
obj: &dyn Objective,
x0: &[f64],
ctl: &mut RunControl<'_>,
) -> Result<OptimResult>;
}Expand description
An optimisation algorithm.
Required Methods§
Sourcefn derivatives(&self) -> Derivatives
fn derivatives(&self) -> Derivatives
What it needs from the objective.
Sourcefn minimize(
&self,
obj: &dyn Objective,
x0: &[f64],
ctl: &mut RunControl<'_>,
) -> Result<OptimResult>
fn minimize( &self, obj: &dyn Objective, x0: &[f64], ctl: &mut RunControl<'_>, ) -> Result<OptimResult>
Minimise obj from x0.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".