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

pub trait Population {
    fn add_all(&mut self, individuals: Vec<Individual>);
fn add(&mut self, individual: Individual);
fn ranked<'a>(
        &'a self
    ) -> Box<dyn Iterator<Item = (&Individual, usize)> + 'a>;
fn size(&self) -> usize; }

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

Required methods

fn add_all(&mut self, individuals: Vec<Individual>)

Adds all individuals into the population, then sorts and shrinks population if necessary.

fn add(&mut self, individual: Individual)

Adds an individual into the population.

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

Returns individuals within their rank sorted according their quality.

fn size(&self) -> usize

Returns population size.

Loading content...

Implementors

impl Population for DominancePopulation[src]

Loading content...