Expand description
Modules§
- chacha
- The ChaCha random number generator.
- distributions
- Sampling from random distributions.
- isaac
- The ISAAC random number generator.
- jitter
- Non-physical true random number generator based on timing jitter.
- os
- Interfaces to the operating system provided random number generators.
- read
- A wrapper around any Read to treat it as an RNG.
- reseeding
- A wrapper around another RNG that reseeds it after it generates a certain number of random bytes.
- seq
- Functions for randomly accessing and sampling sequences.
Structs§
- Ascii
Generator - Iterator which will continuously generate random ascii characters.
- ChaCha
Rng - A random number generator that uses the ChaCha20 algorithm [1].
- Closed01
- A wrapper for generating floating point numbers uniformly in the
closed interval
[0,1]
(including both endpoints). - Generator
- Iterator which will generate a stream of random items.
- Isaac64
Rng - A random number generator that uses ISAAC-64[1], the 64-bit variant of the ISAAC algorithm.
- Isaac
Rng - A random number generator that uses the ISAAC algorithm[1].
- Jitter
Rng - A true random number generator based on jitter in the CPU execution time, and jitter in memory access time.
- Open01
- A wrapper for generating floating point numbers uniformly in the
open interval
(0,1)
(not including either endpoint). - OsRng
- A random number generator that retrieves randomness straight from the operating system. Platform sources:
- StdRng
- The standard RNG. This is designed to be efficient on the current platform.
- Thread
Rng - The thread-local RNG.
- XorShift
Rng - An Xorshift[1] random number generator.
Traits§
- Rand
- A type that can be randomly generated using an
Rng
. - Rng
- A random number generator.
- Seedable
Rng - A random number generator that can be explicitly seeded to produce the same stream of randomness multiple times.
Functions§
- random
- Generates a random value using the thread-local random number generator.
- sample
Deprecated - DEPRECATED: use
seq::sample_iter
instead. - thread_
rng - 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>()
. - weak_
rng - Create a weak random number generator with a default algorithm and seed.