Trait genevo::operator::SelectionOp
source · [−]pub trait SelectionOp<G, F>: GeneticOperator where
G: Genotype,
F: Fitness, {
fn select_from<R>(
&self,
population: &EvaluatedPopulation<G, F>,
rng: &mut R
) -> Vec<Parents<G>>
where
R: Rng + Sized;
}
Expand description
A SelectionOp
defines the function of how to select solutions for being
the parents of the next generation.
Required methods
fn select_from<R>(
&self,
population: &EvaluatedPopulation<G, F>,
rng: &mut R
) -> Vec<Parents<G>> where
R: Rng + Sized,
fn select_from<R>(
&self,
population: &EvaluatedPopulation<G, F>,
rng: &mut R
) -> Vec<Parents<G>> where
R: Rng + Sized,
Selects individuals from the given population according to the implemented selection strategy.