pub trait KnapsackSolver {
// Required methods
fn solve(
&self,
problem: &KnapsackProblem,
params: &SolverParams,
) -> Result<KnapsackSolution>;
fn name(&self) -> &'static str;
}Expand description
Trait for knapsack solvers
Required Methods§
Sourcefn solve(
&self,
problem: &KnapsackProblem,
params: &SolverParams,
) -> Result<KnapsackSolution>
fn solve( &self, problem: &KnapsackProblem, params: &SolverParams, ) -> Result<KnapsackSolution>
Solve the knapsack problem