Struct genetic_algorithm::crossover::CrossoverUniform
source · [−]pub struct CrossoverUniform(pub KeepParent);
Expand description
Crossover with 50% probability for each gene to come from one of the two parents. Optionally keep parents around to compete with children later on.
Not allowed for unique genotypes as it would not preserve the gene uniqueness in the children.
Tuple Fields
0: KeepParent
Trait Implementations
sourceimpl Crossover for Uniform
impl Crossover for Uniform
fn call<T: Genotype, R: Rng>(
&self,
genotype: &T,
population: &mut Population<T>,
rng: &mut R
)
sourcefn 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 Read more
sourcefn 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 Read more
Auto Trait Implementations
impl RefUnwindSafe for Uniform
impl Send for Uniform
impl Sync for Uniform
impl Unpin for Uniform
impl UnwindSafe for Uniform
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more