pub trait Solver {
type Model: SolverModel;
// Required methods
fn create_model(&mut self, problem: UnsolvedProblem) -> Self::Model;
fn name() -> &'static str;
}Expand description
An entity that is able to solve linear problems
Required Associated Types§
Sourcetype Model: SolverModel
type Model: SolverModel
The internal model type used by the solver
Required Methods§
Sourcefn create_model(&mut self, problem: UnsolvedProblem) -> Self::Model
fn create_model(&mut self, problem: UnsolvedProblem) -> Self::Model
Solve the given problem
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§
Source§impl<SOLVER, MODEL> Solver for SOLVER
A function that takes an UnsolvedProblem and returns a SolverModel automatically implements Solver
impl<SOLVER, MODEL> Solver for SOLVER
A function that takes an UnsolvedProblem and returns a SolverModel automatically implements Solver