Struct random::Default [] [src]

pub struct Default(_);

An instance of the default source.

The default source is the Xorshift128+ algorithm.

Methods

impl Default
[src]

Create an instance of the default source.

Each thread has its own copy of the default source, and each copy is initialized with the same default seed. Therefore, the usage is thread safe; however, each thread is responsible for reseeding its source.

Seed the source.

At least one bit of the seed should be nonzero.

Trait Implementations

impl Clone for Default
[src]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

impl Source for Default
[src]

Read u64 uniformly distributed over {0, 1, …, u64::MAX}.

Read f64 uniformly distributed over [0, 1].

Read a random value.

Read a sequence of random values.