Trait metasolver::simulated_annealing::Neighbours [] [src]

pub trait Neighbours<T: Iterator<Item = Self::Neighbour>> {
    type Neighbour;
    fn neighbours(&self) -> T;
fn apply_neighbour(&mut self, _: Self::Neighbour);
fn neighbour_fitness(&self, _: &Self::Neighbour) -> f32; }

Type T is your iterator of neigbours. Fitness of the neighbour is checked with another fitness function allowing optimization.

For example your neighbour_fitness can return a heuristic answer.

Associated Types

This is a neighbour. A type that when applied to the solution, modifies the solution in some way.

Required Methods

Returns an iterator over neighbours.

Modifies the solution.

Implementors