Struct genetic_algorithm::crossover::CrossoverClone
source · [−]pub struct CrossoverClone(pub KeepParent);Expand description
Children are clones of the parents, effectively doubling the population if you keep the parents. Acts as no-op if the parents are not kept.
Allowed for unique genotypes.
Tuple Fields
0: KeepParentTrait Implementations
sourceimpl Crossover for Clone
impl Crossover for Clone
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 Clone
impl Send for Clone
impl Sync for Clone
impl Unpin for Clone
impl UnwindSafe for Clone
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