CoreComponents 3.0.0
A Modern C++ Toolkit
|
Pseudo-random number generator. More...
#include <cc/Random>
Public Member Functions | |
Random (uint32_t seed=0) | |
Create a new random number generator. | |
uint32_t | get () |
Generate another random number. | |
uint32_t | get (uint32_t a, uint32_t b) |
Get another random number in range [a, b]. | |
uint32_t | operator() () |
Generate another random number. | |
uint32_t | operator() (uint32_t a, uint32_t b) |
Get another random number in range [a, b]. | |
template<class Container > | |
void | shuffle (Container &container) |
Randomly shuffle items in container. | |
Pseudo-random number generator.
The Random class provides a simple and fast pseudo-random number generator.
Create a new random number generator.
seed | Seed number |
uint32_t get | ( | ) |
Generate another random number.
uint32_t operator() | ( | ) |
Generate another random number.
void shuffle | ( | Container & | container | ) |
Randomly shuffle items in container.