Skip to main content

Optimizer

Trait Optimizer 

Source
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§

Source

fn name(&self) -> &'static str

The name the configuration uses.

Source

fn derivatives(&self) -> Derivatives

What it needs from the objective.

Source

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".

Implementors§