Struct random::Xorshift128Plus [] [src]

pub struct Xorshift128Plus {
    // some fields omitted
}

The Xorshift128+ algorithm.

References

  1. Sebastiano Vigna, “Further Scramblings of Marsaglia’s Xorshift Generators,” CoRR, 2014.

  2. https://en.wikipedia.org/wiki/Xorshift#Xorshift.2B

Methods

impl Xorshift128Plus
[src]

fn new(seed: [u64; 2]) -> Xorshift128Plus

Create an instance of the algorithm.

At least one bit of the seed should be nonzero.

Trait Implementations

impl Copy for Xorshift128Plus
[src]

impl Clone for Xorshift128Plus
[src]

fn clone(&self) -> Xorshift128Plus

Returns a copy of the value. Read more

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

Performs copy-assignment from source. Read more

impl Source for Xorshift128Plus
[src]

fn read_u64(&mut self) -> u64

Read a random u64. Read more

fn read_f64(&mut self) -> f64

Read a random f64. Read more

fn read<T: Element>(&mut self) -> T where Self: Sized

Read a random element.

fn iter<'l, T: Element>(&'l mut self) -> Sequence<'l, Self, T> where Self: Sized

Read a sequence of random elements.