[][src]Trait optlib::genetic::Pairing

pub trait Pairing<T: Clone> {
    fn get_pairs(&mut self, population: &Population<T>) -> Vec<Vec<usize>>;
}

The trait to select individuals to pairing.

T - type of a point in the search space for goal function (chromosomes).

Required methods

fn get_pairs(&mut self, population: &Population<T>) -> Vec<Vec<usize>>

The method must select individuals to cross. Returns vector of vector with individuals numbers in population. Selected individuals will parents for new children.

Loading content...

Implementors

impl<T: Clone> Pairing<T> for RandomPairing[src]

impl<T: Clone> Pairing<T> for Tournament[src]

Loading content...