Struct mersenne_twister::MT19937_64 [] [src]

pub struct MT19937_64 {
    // some fields omitted
}

The 64-bit flavor of the Mersenne Twister pseudorandom number generator.

Methods

impl MT19937_64

fn new_unseeded() -> MT19937_64

Create a new Mersenne Twister random number generator using the default fixed seed.

fn recover(samples: &[u64]) -> MT19937_64

Recover the internal state of a Mersenne Twister instance from 312 consecutive outputs of the algorithm.

The returned MT19937_64 is guaranteed to identically reproduce subsequent outputs of the RNG that was sampled. This is why one does not use Mersenne Twister in cryptography.

Panics if the length of the slice is not exactly 312.

Trait Implementations

impl Clone for MT19937_64

fn clone(&self) -> MT19937_64

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

impl SeedableRng<u64> for MT19937_64

fn from_seed(seed: u64) -> MT19937_64

fn reseed(&mut self, seed: u64)

impl<'a> SeedableRng<&'a [u64]> for MT19937_64

fn from_seed(seed: &[u64]) -> MT19937_64

fn reseed(&mut self, key: &[u64])

impl Rng for MT19937_64

fn next_u32(&mut self) -> u32

fn next_u64(&mut self) -> u64

fn next_f32(&mut self) -> f32

fn next_f64(&mut self) -> f64

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

fn gen<T>(&mut self) -> T where T: Rand

fn gen_iter<T>(&'a mut self) -> Generator<'a, T, Self> where T: Rand

fn gen_range<T>(&mut self, low: T, high: T) -> T where T: SampleRange + PartialOrd<T>

fn gen_weighted_bool(&mut self, n: u32) -> bool

fn gen_ascii_chars(&'a mut self) -> AsciiGenerator<'a, Self>

fn choose<T>(&mut self, values: &'a [T]) -> Option<&'a T>

fn shuffle<T>(&mut self, values: &mut [T])

impl Default for MT19937_64

fn default() -> MT19937_64

Derived Implementations

impl Copy for MT19937_64