[][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) -> Option<&Individual>;
fn size(&self) -> usize; }

A trait which models a population with individuals (solutions).

Required methods

fn add(&mut self, individual: Individual)

Adds an individual into the population.

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

Returns all solutions from the population sorted according their quality.

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

Returns best solution from the population.

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

Returns one of solutions from the population.

fn size(&self) -> usize

Returns population size.

Loading content...

Implementors

impl Population for DominancePopulation[src]

Loading content...