Skip to main content

Optimizer

Trait Optimizer 

Source
pub trait Optimizer {
    // Required method
    fn optimize(&mut self, problem: &mut Problem) -> OptimizeResult;
}
Expand description

Unified optimizer interface. Object-safe — Box<dyn Optimizer> is valid.

All three optimizers (LevenbergMarquardt, GaussNewton, DogLeg) implement this trait. Each optimizer also provides inherent new(), with_config(), and optimize() methods for direct (non-polymorphic) usage.

Required Methods§

Source

fn optimize(&mut self, problem: &mut Problem) -> OptimizeResult

Optimize the problem to minimize the cost function.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§