pub struct CrossoverRepopulator<G>where
G: Crossover,{
pub mutation_rate: f32,
/* private fields */
}Expand description
Repopulator that uses crossover reproduction to create new genomes.
Fields§
§mutation_rate: f32The mutation rate to use when mutating genomes. 0.0 - 1.0
Implementations§
Source§impl<G> CrossoverRepopulator<G>where
G: Crossover,
impl<G> CrossoverRepopulator<G>where
G: Crossover,
Sourcepub fn new(mutation_rate: f32) -> CrossoverRepopulator<G>
pub fn new(mutation_rate: f32) -> CrossoverRepopulator<G>
Creates a new CrossoverRepopulator.
Trait Implementations§
Source§impl<G> Repopulator<G> for CrossoverRepopulator<G>where
G: Crossover,
impl<G> Repopulator<G> for CrossoverRepopulator<G>where
G: Crossover,
Source§fn repopulate(&self, genomes: &mut Vec<G>, target_size: usize)
fn repopulate(&self, genomes: &mut Vec<G>, target_size: usize)
Replaces the genomes in the simulation.
Auto Trait Implementations§
impl<G> Freeze for CrossoverRepopulator<G>
impl<G> RefUnwindSafe for CrossoverRepopulator<G>where
G: RefUnwindSafe,
impl<G> Send for CrossoverRepopulator<G>where
G: Send,
impl<G> Sync for CrossoverRepopulator<G>where
G: Sync,
impl<G> Unpin for CrossoverRepopulator<G>where
G: Unpin,
impl<G> UnwindSafe for CrossoverRepopulator<G>where
G: UnwindSafe,
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more