Trait genetic_algorithm::crossover::Crossover
source · [−]pub trait Crossover: Clone + Debug {
fn call<T: Genotype, R: Rng>(
&self,
genotype: &T,
population: &mut Population<T>,
rng: &mut R
);
fn require_crossover_indexes(&self) -> bool;
fn require_crossover_points(&self) -> bool;
}
Required Methods
fn require_crossover_indexes(&self) -> bool
fn require_crossover_indexes(&self) -> bool
to guard against invalid Crossover strategies which break the internal consistency of the genes, unique genotypes can’t simply exchange genes without gene duplication issues
fn require_crossover_points(&self) -> bool
fn require_crossover_points(&self) -> bool
to guard against invalid Crossover strategies which break the internal consistency of the genes, unique genotypes can’t simply exchange genes without gene duplication issues