pub struct BlendCrossover { /* private fields */ }
Implementations§
Source§impl BlendCrossover
impl BlendCrossover
Sourcepub fn new(rate: f32, alpha: f32) -> BlendCrossover
pub fn new(rate: f32, alpha: f32) -> BlendCrossover
Create a new instance of the BlendCrossover
with the given rate and alpha.
The rate must be between 0.0 and 1.0, and the alpha must be between 0.0 and 1.0.
Trait Implementations§
Source§impl Clone for BlendCrossover
impl Clone for BlendCrossover
Source§fn clone(&self) -> BlendCrossover
fn clone(&self) -> BlendCrossover
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl<C, G> Crossover<C> for BlendCrossover
impl<C, G> Crossover<C> for BlendCrossover
fn rate(&self) -> f32
fn cross_chromosomes( &self, chrom_one: &mut C, chrom_two: &mut C, rate: f32, ) -> AlterResult
fn name(&self) -> String
fn alterer(self) -> AlterAction<C>where
Self: Sized + 'static,
fn crossover( &self, population: &mut Population<C>, generation: usize, rate: f32, ) -> AlterResult
fn cross( &self, population: &mut Population<C>, parent_indexes: &[usize], generation: usize, rate: f32, ) -> AlterResult
Source§impl Debug for BlendCrossover
impl Debug for BlendCrossover
Source§impl PartialEq for BlendCrossover
impl PartialEq for BlendCrossover
impl StructuralPartialEq for BlendCrossover
Auto Trait Implementations§
impl Freeze for BlendCrossover
impl RefUnwindSafe for BlendCrossover
impl Send for BlendCrossover
impl Sync for BlendCrossover
impl Unpin for BlendCrossover
impl UnwindSafe for BlendCrossover
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