pub fn crossover<G: Genome>(
individual_left: &mut G,
individual_right: &mut G,
method: CrossoverMethod,
rng: &mut impl Rng
)
Expand description
Performs the crossover operation on genome_left
and genome_right
.
Depending on method
, different chromosomes between the two individuals will be swapped,
mixing their genetical code.
The two individuals should have the same amount of chromosomes (as defined by [Chromosome::size_hint]). If not, then the crossover operation may yield undesired results.