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, also known as
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.
Construct an instance compatible with PCG seed.
Note that PCG specifies a default value for the parameter:
state = 0xcafef00dd15ea5e5
impl Clone for Mcg128Xsl64[src]
impl Debug for Mcg128Xsl64[src]
impl Eq for Mcg128Xsl64[src]
impl PartialEq<Mcg128Xsl64> for Mcg128Xsl64[src]
pub fn eq(&self, other: &Mcg128Xsl64) -> bool[src]
pub fn ne(&self, other: &Mcg128Xsl64) -> bool[src]
impl RngCore for Mcg128Xsl64[src]
pub fn fill_bytes(&mut self, dest: &mut [u8])[src]
pub fn try_fill_bytes(&mut self, dest: &mut [u8]) -> Result<(), Error>[src]
impl SeedableRng for Mcg128Xsl64[src]
We use a single 126-bit seed to initialise the state and select a stream.
seed bits (lowest order of last byte) are ignored.
type Seed = [u8; 16]
Seed type, which is restricted to types mutably-dereferencable as
arrays (we recommend
[u8; N] for some
N). Read more
pub fn seed_from_u64(state: u64) -> Self[src]
impl StructuralEq for Mcg128Xsl64[src]
impl StructuralPartialEq for Mcg128Xsl64[src]
type Error = Infallible
The type returned in the event of a conversion error.