pub struct Sometimes<M> {
pub inner: M,
pub probability: f64,
}Expand description
Applies inner with probability probability, otherwise leaves the genome unchanged.
Fields§
§inner: MThe wrapped mutation.
probability: f64The probability of applying it, in [0, 1].
Trait Implementations§
impl<M: Copy> Copy for Sometimes<M>
impl<M: PartialEq> StructuralPartialEq for Sometimes<M>
Auto Trait Implementations§
impl<M> Forget for Sometimes<M>
impl<M> Freeze for Sometimes<M>where
M: Freeze,
impl<M> Move for Sometimes<M>
impl<M> RefUnwindSafe for Sometimes<M>where
M: RefUnwindSafe,
impl<M> Send for Sometimes<M>where
M: Send,
impl<M> Sync for Sometimes<M>where
M: Sync,
impl<M> Unpin for Sometimes<M>where
M: Unpin,
impl<M> UnsafeUnpin for Sometimes<M>where
M: UnsafeUnpin,
impl<M> UnwindSafe for Sometimes<M>where
M: 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