Struct rand_pcg::Mcg128Xsl64
source · [−]pub struct Mcg128Xsl64 { /* private fields */ }
Expand description
A PCG random number generator (XSL 128/64 (MCG) variant).
Permuted Congruential Generator with 128-bit state, internal Multiplicative Congruential Generator, and 64-bit output via “xorshift low (bits), random rotation” output function.
This is a 128-bit MCG with the PCG-XSL-RR output function.
Note that compared to the standard pcg64
(128-bit LCG with PCG-XSL-RR
output function), this RNG is faster, also has a long cycle, and still has
good performance on statistical tests.
Note: this RNG is only available using Rust 1.26 or later.
Implementations
sourceimpl Mcg128Xsl64
impl Mcg128Xsl64
Trait Implementations
sourceimpl Clone for Mcg128Xsl64
impl Clone for Mcg128Xsl64
sourcefn clone(&self) -> Mcg128Xsl64
fn clone(&self) -> Mcg128Xsl64
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl Debug for Mcg128Xsl64
impl Debug for Mcg128Xsl64
sourceimpl RngCore for Mcg128Xsl64
impl RngCore for Mcg128Xsl64
sourceimpl SeedableRng for Mcg128Xsl64
impl SeedableRng for Mcg128Xsl64
We use a single 126-bit seed to initialise the state and select a stream.
Two seed
bits (lowest order of last byte) are ignored.
Auto Trait Implementations
impl RefUnwindSafe for Mcg128Xsl64
impl Send for Mcg128Xsl64
impl Sync for Mcg128Xsl64
impl Unpin for Mcg128Xsl64
impl UnwindSafe for Mcg128Xsl64
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcepub fn borrow_mut(&mut self) -> &mut T
pub fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcepub fn to_owned(&self) -> T
pub fn to_owned(&self) -> T
Creates owned data from borrowed data, usually by cloning. Read more
sourcepub fn clone_into(&self, target: &mut T)
pub fn clone_into(&self, target: &mut T)
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more