pub trait Solver {
// Required methods
fn find_best<P: Problem>(&self, problem: &P) -> Vec<Vec<usize>>;
fn find_best_with_size<P: Problem>(
&self,
problem: &P,
) -> Vec<(Vec<usize>, SolutionSize<P::Size>)>;
}Expand description
Trait for problem solvers.
Required Methods§
Sourcefn find_best<P: Problem>(&self, problem: &P) -> Vec<Vec<usize>>
fn find_best<P: Problem>(&self, problem: &P) -> Vec<Vec<usize>>
Find the best solution(s) for a problem.
Returns all configurations that achieve the optimal objective value.
Sourcefn find_best_with_size<P: Problem>(
&self,
problem: &P,
) -> Vec<(Vec<usize>, SolutionSize<P::Size>)>
fn find_best_with_size<P: Problem>( &self, problem: &P, ) -> Vec<(Vec<usize>, SolutionSize<P::Size>)>
Find the best solution(s) along with their solution sizes.
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.