#include <random.hh>
Basic operations | |
| Random (uint32_t seed) | |
| Constructor, with a seed. | |
| Random () | |
| Constructor, with a magic random seed. | |
Public Member Functions | |
| template<typename DiffType_ > | |
| DiffType_ | operator() (DiffType_ max) |
| Fetch a random number in (0, max]. | |
See TCppPL 22.7 for justification. See TaoCP2 3.2.1 for the basic algorithm and AppCrypt 16.1 for the choice of numbers.
1.5.7.1