[][src]Trait vrp_core::solver::Population

pub trait Population {
    fn add(&mut self, individual: Individual);
fn all<'a>(&'a self) -> Box<dyn Iterator<Item = &Individual> + 'a>;
fn best(&self) -> Option<&Individual>;
fn select(&self) -> &Individual;
fn size(&self) -> usize; }

Represents a solution population.

Required methods

fn add(&mut self, individual: Individual)

Adds individual into population.

fn all<'a>(&'a self) -> Box<dyn Iterator<Item = &Individual> + 'a>

Returns all solutions from population sorted according their quality.

fn best(&self) -> Option<&Individual>

Returns best solution from the population.

fn select(&self) -> &Individual

Returns one of solutions from the population.

fn size(&self) -> usize

Returns size of population.

Loading content...

Implementors

impl Population for DominancePopulation[src]

Loading content...