|
Lib
QOLを高める
|
Random number framework. More...
Functions | |
| unsigned int | generateRandomSeed () |
| Generate nondeterministic random number for seed. More... | |
| void | setSeed (unsigned int seed) |
| Set random seed. More... | |
| unsigned int | nextRawUInt32 () |
| Get next uint32 random number. More... | |
| int | nextInt (int a=0, int b=std::numeric_limits< int >::max()) |
| Get next int random number. More... | |
| double | nextDouble (double a=0.0, double max=1.0) |
| Get next double random number. More... | |
Random number framework.
| unsigned int yappy::framework::random::generateRandomSeed | ( | ) |
Generate nondeterministic random number for seed.
Uses std::random_device. Probably uses win32 CryptGenRandom(). This function will be slow.
Definition at line 19 of file framework.cpp.
| double yappy::framework::random::nextDouble | ( | double | a = 0.0, |
| double | max = 1.0 |
||
| ) |
Get next double random number.
| [in] | a | min value (inclusive) |
| [in] | b | max value (exclusive) |
Definition at line 40 of file framework.cpp.
| int yappy::framework::random::nextInt | ( | int | a = 0, |
| int | b = std::numeric_limits< int >::max() |
||
| ) |
Get next int random number.
| [in] | a | min value (inclusive) |
| [in] | b | max value (inclusive) |
Definition at line 34 of file framework.cpp.
| unsigned int yappy::framework::random::nextRawUInt32 | ( | ) |
Get next uint32 random number.
Definition at line 29 of file framework.cpp.
| void yappy::framework::random::setSeed | ( | unsigned int | seed | ) |
Set random seed.
| [in] | seed | Random seed. |
Definition at line 24 of file framework.cpp.
1.8.11