Trait genevo::operator::SelectionOp
[−]
[src]
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; }
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,
&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.
Implementors
impl<G, F> SelectionOp<G, F> for RouletteWheelSelector where
G: Genotype,
F: Fitness + AsScalar,impl<G, F> SelectionOp<G, F> for UniversalSamplingSelector where
G: Genotype,
F: Fitness + AsScalar,impl<G, F> SelectionOp<G, F> for TournamentSelector where
G: Genotype,
F: Fitness,impl<G, F> SelectionOp<G, F> for MaximizeSelector where
G: Genotype,
F: Fitness,