Skip to main content

Optimizer

Trait Optimizer 

Source
pub trait Optimizer {
    // Required method
    fn optimize(
        &mut self,
        problem: &Problem,
        initial_params: &HashMap<String, (ManifoldType, DVector<f64>)>,
    ) -> Result<SolverResult<HashMap<String, VariableEnum>>, ApexSolverError>;
}
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: &Problem, initial_params: &HashMap<String, (ManifoldType, DVector<f64>)>, ) -> Result<SolverResult<HashMap<String, VariableEnum>>, ApexSolverError>

Optimize the problem to minimize the cost function.

Implementors§