TspSolver

Trait TspSolver 

Source
pub trait TspSolver: Send + Sync {
    // Required methods
    fn solve(
        &mut self,
        instance: &TspInstance,
        budget: Budget,
    ) -> TspResult<TspSolution>;
    fn name(&self) -> &'static str;
    fn reset(&mut self);
}
Expand description

Trait for TSP solvers

Required Methods§

Source

fn solve( &mut self, instance: &TspInstance, budget: Budget, ) -> TspResult<TspSolution>

Solve a TSP instance

Source

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

Get algorithm name

Source

fn reset(&mut self)

Reset solver state

Implementors§