Expand description
[!NOTE] Beta release. The quality of generated pseudo random numbers is not tested at now.
This crate provides common psuedo random number generators written in pure Rust, which include:
name | supported mode | cycle period | reference |
---|---|---|---|
Mersenne Twister | MT19937 MT19937_64 | 219937-1 | Saitoh and Matsumoto (1997) |
Xorshift | xorshift32 xorshift64 xorshift128 xorshift64* xorshift1024* | 264-1 264-1 2128-1 264-1 21024-1 | Marsaglia (2003), J. Stat. Softw. 8 (14) Vigna (2016), ACM Trans. Math. Softw. Vol. 42 (4), 30 |
PCG (with LCG) | PCG-XSL-RR-128/64 PCG-XSH-RS-64/32 PCG-XSH-RR-64/32 | 2128 264 264 | O’Neil (2014), HMC-CS-2014-0905 Reference implementation |
Modules§
- mt
- The
mt
module implements Mersenne Twister 19937. - mt64
- The
mt64
module provides 64bit implementation for Mersenne Twister 19937. - pcg
- The
pcg
module implements Permutational Computation Generator (PCG) family with Linear Congruential Generator (LCG). - xorshift
- The
xorshift
module implements xorshift family PRNG.