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§
Trait Implementations§
Source§impl Clone for Mcg128Xsl64
impl Clone for Mcg128Xsl64
Source§fn clone(&self) -> Mcg128Xsl64
fn clone(&self) -> Mcg128Xsl64
Returns a copy 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 Debug for Mcg128Xsl64
impl Debug for Mcg128Xsl64
Source§impl RngCore for Mcg128Xsl64
impl RngCore for Mcg128Xsl64
Source§fn fill_bytes(&mut self, dest: &mut [u8])
fn fill_bytes(&mut self, dest: &mut [u8])
Fill
dest
with random data. Read moreSource§impl 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 Freeze for Mcg128Xsl64
impl RefUnwindSafe for Mcg128Xsl64
impl Send for Mcg128Xsl64
impl Sync for Mcg128Xsl64
impl Unpin for Mcg128Xsl64
impl UnwindSafe for Mcg128Xsl64
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)