OptimizationSolver

Trait OptimizationSolver 

Source
pub trait OptimizationSolver:
    Debug
    + Send
    + Sync {
    type Config: Debug + Clone + Send + Sync;
    type Result: Debug + Clone + Send + Sync;

    // Required methods
    fn solve(
        &self,
        objective: &dyn Objective,
        initial_guess: &Array1<Float>,
        config: &Self::Config,
    ) -> Result<Self::Result>;
    fn supports_objective(&self, objective: &dyn Objective) -> bool;
    fn name(&self) -> &'static str;

    // Provided method
    fn get_recommendations(
        &self,
        _data: &ObjectiveData,
    ) -> SolverRecommendations { ... }
}
Expand description

Trait for optimization solvers

Required Associated Types§

Source

type Config: Debug + Clone + Send + Sync

Configuration type for this solver

Source

type Result: Debug + Clone + Send + Sync

Result type returned by this solver

Required Methods§

Source

fn solve( &self, objective: &dyn Objective, initial_guess: &Array1<Float>, config: &Self::Config, ) -> Result<Self::Result>

Solve the optimization problem

Source

fn supports_objective(&self, objective: &dyn Objective) -> bool

Check if this solver supports the given objective type

Source

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

Get the name of this solver

Provided Methods§

Source

fn get_recommendations(&self, _data: &ObjectiveData) -> SolverRecommendations

Get solver-specific recommendations for the given problem

Implementors§