Expand description
Utilities for random number generation
Re-exports
Modules
The ChaCha random number generator.
Sampling from random distributions.
The ISAAC random number generator.
Interfaces to the operating system provided random number
generators.
A wrapper around any Read to treat it as an RNG.
A wrapper around another RNG that reseeds it after it
generates a certain number of random bytes.
Structs
Iterator which will continuously generate random ascii characters.
A wrapper for generating floating point numbers uniformly in the
closed interval
[0,1]
(including both endpoints).Iterator which will generate a stream of random items.
A wrapper for generating floating point numbers uniformly in the
open interval
(0,1)
(not including either endpoint).The standard RNG. This is designed to be efficient on the current
platform.
The thread-local RNG.
An Xorshift[1] random number
generator.
Traits
A type that can be randomly generated using an
Rng
.A random number generator.
A random number generator that can be explicitly seeded to produce
the same stream of randomness multiple times.
Functions
Generates a random value using the thread-local random number generator.
Randomly sample up to
amount
elements from a finite iterator.
The order of elements in the sample is not random.Retrieve the lazily-initialized thread-local random number
generator, seeded by the system. Intended to be used in method
chaining style, e.g.
thread_rng().gen::<i32>()
.Create a weak random number generator with a default algorithm and seed.