Type Alias Pcg64Mcg

Source
pub type Pcg64Mcg = Mcg128Xsl64;
Expand description

A friendly name for Mcg128Xsl64.

Aliased Type§

struct Pcg64Mcg { /* private fields */ }

Implementations

Source§

impl Mcg128Xsl64

Source

pub fn new(state: u128) -> Self

Construct an instance compatible with PCG seed.

Note that PCG specifies a default value for the parameter:

  • state = 0xcafef00dd15ea5e5

Trait Implementations

Source§

impl Clone for Mcg128Xsl64

Source§

fn clone(&self) -> Mcg128Xsl64

Returns a copy of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for Mcg128Xsl64

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl RngCore for Mcg128Xsl64

Source§

fn next_u32(&mut self) -> u32

Return the next random u32. Read more
Source§

fn next_u64(&mut self) -> u64

Return the next random u64. Read more
Source§

fn fill_bytes(&mut self, dest: &mut [u8])

Fill dest with random data. Read more
Source§

fn try_fill_bytes(&mut self, dest: &mut [u8]) -> Result<(), Error>

Fill dest entirely with random data. Read more
Source§

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.

Source§

type Seed = [u8; 16]

Seed type, which is restricted to types mutably-dereferencable as u8 arrays (we recommend [u8; N] for some N). Read more
Source§

fn from_seed(seed: Self::Seed) -> Self

Create a new PRNG using the given seed. Read more
Source§

fn seed_from_u64(state: u64) -> Self

Create a new PRNG using a u64 seed. Read more
Source§

fn from_rng<R>(rng: R) -> Result<Self, Error>
where R: RngCore,

Create a new PRNG seeded from another Rng. Read more