Convenience interface for random number and data generation.
More...
#include <Random.h>
|
| static void | seed (unsigned int s) |
| | Sets the seed of the random number generator. More...
|
| |
| static uint32_t | number32 (uint32_t maximum=0) |
| | Returns a random 32-bit unsigned integer. More...
|
| |
| static int64_t | number64 (int64_t maximum=0) |
| | Returns a random 64-bit unsigned integer. More...
|
| |
| static double | uniform01 () |
| | Returns a random double. More...
|
| |
| static std::chrono::milliseconds | duration_millis (uint32_t maximum) |
| | Returns a random millisecond duration. More...
|
| |
Convenience interface for random number and data generation.
Definition at line 37 of file Random.h.
| chrono::milliseconds Random::duration_millis |
( |
uint32_t |
maximum | ) |
|
|
static |
Returns a random millisecond duration.
- Returns
- Random millisecond duration in the range [0,
maximum)
Definition at line 77 of file Random.cc.
| uint32_t Random::number32 |
( |
uint32_t |
maximum = 0 | ) |
|
|
static |
Returns a random 32-bit unsigned integer.
- Returns
- Random 32-bit integer in the range [0,
maximum)
Definition at line 55 of file Random.cc.
| int64_t Random::number64 |
( |
int64_t |
maximum = 0 | ) |
|
|
static |
Returns a random 64-bit unsigned integer.
- Returns
- Random 64-bit integer in the range [0,
maximum)
Definition at line 63 of file Random.cc.
| void Random::seed |
( |
unsigned int |
s | ) |
|
|
static |
Sets the seed of the random number generator.
- Parameters
-
Definition at line 50 of file Random.cc.
| double Random::uniform01 |
( |
| ) |
|
|
static |
Returns a random double.
- Returns
- Random double in the range [0.0, 1.0)
Definition at line 72 of file Random.cc.
The documentation for this class was generated from the following files:
- /home/doug/src/hypertable/src/cc/Common/Random.h
- /home/doug/src/hypertable/src/cc/Common/Random.cc