mirror of
https://github.com/rust-lang/rust.git
synced 2026-04-27 18:57:42 +03:00
Updated Lib rand (markdown)
+17
-6
@@ -48,6 +48,9 @@ Generating random numbers, and sampling from random distributions.
|
||||
- Tausworthe generators
|
||||
- ["Random Numbers Generated by Linear Recurrence Modulo Two" Tausworthe 1965](http://www.ams.org/journals/mcom/1965-19-090/S0025-5718-1965-0184406-1/S0025-5718-1965-0184406-1.pdf)
|
||||
- Good theoretical properties
|
||||
- Wichmann Hill
|
||||
- ["Generating good pseudo-random numbers" Wichmann-Hill 2005](http://dl.acm.org/citation.cfm?id=1219278)
|
||||
|
||||
2. Technique: Testing quality of random numbers
|
||||
- Very important! Extremely hard to tell if random numbers are "random enough" (a bug in an implementation, or a bad algorithm, can produce numbers that look random but aren't random enough for many purposes).
|
||||
- [Overview wikipedia article](http://en.wikipedia.org/wiki/Randomness_test)
|
||||
@@ -58,12 +61,20 @@ Generating random numbers, and sampling from random distributions.
|
||||
- [NIST](http://csrc.nist.gov/groups/ST/toolkit/rng/index.html)
|
||||
- Add a new make target "check-rngs" with a testsuite?
|
||||
3. Technique: sampling from distributions
|
||||
- [Inverse transform sampling](http://en.wikipedia.org/wiki/Inverse_transform_sampling) (fully general)
|
||||
- [Ziggurat algorithm](http://en.wikipedia.org/wiki/Ziggurat_algorithm) (distributions with decreasing density functions)
|
||||
- ["The Monty Python method for generating random variables" Marsaglia & Tsang 1998](http://dl.acm.org/citation.cfm?id=292395.292453) (similar to Ziggurat, except slightly slower and doesn't require tables.)
|
||||
- [Box-Muller transform](https://en.wikipedia.org/wiki/Box%E2%80%93Muller_transform) and [Marsaglia polar method](https://en.wikipedia.org/wiki/Marsaglia_polar_method) (normal distribution, both are almost certainly inferior to the ziggurat algorithm)
|
||||
- ["A simple method for generating gamma variables" Marsaglia & Tsang 2000](http://dl.acm.org/citation.cfm?id=358414)
|
||||
- ["Gaussian Random Number Generators" Thomas, Luk, Leong, Villasenor 2007](http://www.cse.cuhk.edu.hk/~phwl/mt/public/archives/papers/grng_acmcs07.pdf) (extremely comprehensive overview of many algorithms for normal RVs, including performance and statistical comparisons. Their conclusion is Ziggurat is fast and statistically good.)
|
||||
- Converting ints to floats:
|
||||
- Most languages/implementations just multiply the random int by `2**-num_bits` to get a float in `[0,1)`.
|
||||
- ["Conversion of High-Period Random Numbers to Floating Point" Doornik 2006](http://www.doornik.com/research/randomdouble.pdf)
|
||||
- General:
|
||||
- [Inverse transform sampling](http://en.wikipedia.org/wiki/Inverse_transform_sampling)
|
||||
- [Ziggurat algorithm](http://en.wikipedia.org/wiki/Ziggurat_algorithm) (any distribution with decreasing density functions)
|
||||
- ["The Monty Python method for generating random variables" Marsaglia & Tsang 1998](http://dl.acm.org/citation.cfm?id=292395.292453) (similar to Ziggurat, except slightly slower and doesn't require tables.)
|
||||
- Normal
|
||||
- [Box-Muller transform](https://en.wikipedia.org/wiki/Box%E2%80%93Muller_transform) and [Marsaglia polar method](https://en.wikipedia.org/wiki/Marsaglia_polar_method) (normal distribution, both are almost certainly inferior to the ziggurat algorithm)
|
||||
- ["Gaussian Random Number Generators" Thomas, Luk, Leong, Villasenor 2007](http://www.cse.cuhk.edu.hk/~phwl/mt/public/archives/papers/grng_acmcs07.pdf) (extremely comprehensive overview of many algorithms for normal RVs, including performance and statistical comparisons. Their conclusion is Ziggurat is fast and statistically good.)
|
||||
- Gamma
|
||||
- ["A simple method for generating gamma variables" Marsaglia & Tsang 2000](http://dl.acm.org/citation.cfm?id=358414)
|
||||
- ["A Simple Gamma Random Number Generator for Arbitrary Shape Parameters" Tanizaki 2008](http://citeseerx.ist.psu.edu/viewdoc/summary?doi=10.1.1.158.3866)
|
||||
|
||||
|
||||
|
||||
### Summary of research on standards and leading techniques
|
||||
|
||||
Reference in New Issue
Block a user