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§
Required Methods§
Sourcefn solve(
&self,
objective: &dyn Objective,
initial_guess: &Array1<Float>,
config: &Self::Config,
) -> Result<Self::Result>
fn solve( &self, objective: &dyn Objective, initial_guess: &Array1<Float>, config: &Self::Config, ) -> Result<Self::Result>
Solve the optimization problem
Sourcefn supports_objective(&self, objective: &dyn Objective) -> bool
fn supports_objective(&self, objective: &dyn Objective) -> bool
Check if this solver supports the given objective type
Provided Methods§
Sourcefn get_recommendations(&self, _data: &ObjectiveData) -> SolverRecommendations
fn get_recommendations(&self, _data: &ObjectiveData) -> SolverRecommendations
Get solver-specific recommendations for the given problem