[−][src]Trait oxigen::survival_pressure::SurvivalPressure
This trait defines the kill function used to remove individuals at the end of a generation.
Required methods
pub fn kill(
&self,
population_size: usize,
population: &mut Vec<IndWithFitness<T, G>>,
parents_children: &[Reproduction]
)
[src]
&self,
population_size: usize,
population: &mut Vec<IndWithFitness<T, G>>,
parents_children: &[Reproduction]
)
Removes individuals according to the population size; the population and
the fitness of the population; and the parents and children relationships.
Population is not sorted in any particular order, but children are after population_size
.
Note that in oxigen 1.x versions this function returned the indexes to be
deleted without modifying the population, not it directly removes the individuals.
Implementors
impl<T: PartialEq + Send + Sync, G: Genotype<T>> SurvivalPressure<T, G> for SurvivalPressureFunctions
[src]
pub fn kill(
&self,
population_size: usize,
population: &mut Vec<IndWithFitness<T, G>>,
parents_children: &[Reproduction]
)
[src]
&self,
population_size: usize,
population: &mut Vec<IndWithFitness<T, G>>,
parents_children: &[Reproduction]
)