pub struct Gaussian { /* private fields */ }Expand description
Gaussian mutation operator for continuous-valued genomes.
Selects a random gene and adds Gaussian noise with the configured standard deviation. Optionally clamps the result to specified bounds.
§Examples
use evolve::operators::sequential::mutation::Gaussian;
// Unbounded
let mutation = Gaussian::new(0.1);
// Lower bound only
let mutation = Gaussian::new(0.1).min(0.0);
// Upper bound only
let mutation = Gaussian::new(0.1).max(1.0);
// Both bounds
let mutation = Gaussian::new(0.1).min(-1.0).max(1.0);Implementations§
Trait Implementations§
Source§impl<F, Fe, R, C, const N: usize> GeneticOperator<[f32; N], F, Fe, R, C> for Gaussian
impl<F, Fe, R, C, const N: usize> GeneticOperator<[f32; N], F, Fe, R, C> for Gaussian
Source§impl<F, Fe, R, C, const N: usize> GeneticOperator<[f64; N], F, Fe, R, C> for Gaussian
impl<F, Fe, R, C, const N: usize> GeneticOperator<[f64; N], F, Fe, R, C> for Gaussian
Source§impl<F, Fe, R, C> GeneticOperator<Vec<f32>, F, Fe, R, C> for Gaussian
impl<F, Fe, R, C> GeneticOperator<Vec<f32>, F, Fe, R, C> for Gaussian
Source§impl<F, Fe, R, C> GeneticOperator<Vec<f64>, F, Fe, R, C> for Gaussian
impl<F, Fe, R, C> GeneticOperator<Vec<f64>, F, Fe, R, C> for Gaussian
impl Copy for Gaussian
Auto Trait Implementations§
impl Freeze for Gaussian
impl RefUnwindSafe for Gaussian
impl Send for Gaussian
impl Sync for Gaussian
impl Unpin for Gaussian
impl UnsafeUnpin for Gaussian
impl UnwindSafe for Gaussian
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