Struct pcg_rand::Pcg32Basic [−][src]
pub struct Pcg32Basic { /* fields omitted */ }
A low overhead very simple PCG impementation
This is mostly useful for demonstrating how PCG works.
If you want better statistical performance you should use one of the predefined types like
Pcg32
.
Methods
impl Pcg32Basic
[src]
impl Pcg32Basic
pub fn new_unseeded() -> Pcg32Basic
[src]
pub fn new_unseeded() -> Pcg32Basic
Creates a new PCG without specifying a seed.
WARNING: Every PCG created with this method will produce the same
output. In most cases a seeded PCG will be more useful, please check
the references for rand::SeedableRng
and rand::FromEntropy
for
methods to seed a PCG.
Trait Implementations
impl RngCore for Pcg32Basic
[src]
impl RngCore for Pcg32Basic
fn next_u32(&mut self) -> u32
[src]
fn next_u32(&mut self) -> u32
Return the next random u32
. Read more
fn next_u64(&mut self) -> u64
[src]
fn next_u64(&mut self) -> u64
Return the next random u64
. Read more
fn fill_bytes(&mut self, dest: &mut [u8])
[src]
fn fill_bytes(&mut self, dest: &mut [u8])
Fill dest
with random data. Read more
fn try_fill_bytes(&mut self, dest: &mut [u8]) -> Result<(), Error>
[src]
fn try_fill_bytes(&mut self, dest: &mut [u8]) -> Result<(), Error>
Fill dest
entirely with random data. Read more
impl SeedableRng for Pcg32Basic
[src]
impl SeedableRng for Pcg32Basic
type Seed = PcgSeeder<u64>
Seed type, which is restricted to types mutably-dereferencable as u8
arrays (we recommend [u8; N]
for some N
). Read more
fn from_seed(seed: Self::Seed) -> Pcg32Basic
[src]
fn from_seed(seed: Self::Seed) -> Pcg32Basic
Create a new PRNG using the given seed. Read more
fn from_rng<R>(rng: R) -> Result<Self, Error> where
R: RngCore,
[src]
fn from_rng<R>(rng: R) -> Result<Self, Error> where
R: RngCore,
Create a new PRNG seeded from another Rng
. Read more
Auto Trait Implementations
impl Send for Pcg32Basic
impl Send for Pcg32Basic
impl Sync for Pcg32Basic
impl Sync for Pcg32Basic