Solver

Trait Solver 

Source
pub trait Solver {
    type Config;
    type Error;

    // Required methods
    fn new() -> Self;
    fn optimize(
        &mut self,
        problem: &Problem,
        initial_params: &HashMap<String, (ManifoldType, DVector<f64>)>,
    ) -> Result<SolverResult<HashMap<String, VariableEnum>>, Self::Error>;
}
Expand description

Core trait for optimization solvers.

Required Associated Types§

Source

type Config

Configuration type for this solver

Source

type Error

Error type

Required Methods§

Source

fn new() -> Self

Create a new solver with the given configuration

Source

fn optimize( &mut self, problem: &Problem, initial_params: &HashMap<String, (ManifoldType, DVector<f64>)>, ) -> Result<SolverResult<HashMap<String, VariableEnum>>, Self::Error>

Optimize the problem to minimize the cost function

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§