Random number generator, based on the Mersenne twister.
More...
#include <random_number.h>
Random number generator, based on the Mersenne twister.
__gnu_parallel::_RandomNumber::_RandomNumber |
( |
| ) |
|
|
inline |
Default constructor.
Seed with 0.
__gnu_parallel::_RandomNumber::_RandomNumber |
( |
uint32_t |
__seed, |
|
|
uint64_t |
_M_supremum = 0x100000000ULL |
|
) |
| |
|
inline |
Constructor.
- Parameters
-
__seed | Random __seed. |
_M_supremum | Generate integer random numbers in the interval [0,_M_supremum). |
unsigned long __gnu_parallel::_RandomNumber::__genrand_bits |
( |
int |
__bits | ) |
|
|
inline |
Generate a number of random bits, run-time parameter.
- Parameters
-
__bits | Number of bits to generate. |
References _M_mt.
static uint32_t __gnu_parallel::_RandomNumber::__scale_down |
( |
uint64_t |
__x, |
|
|
uint64_t |
_M_supremum, |
|
|
double |
|
|
) |
| |
|
inlinestaticprivate |
uint32_t __gnu_parallel::_RandomNumber::operator() |
( |
| ) |
|
|
inline |
uint32_t __gnu_parallel::_RandomNumber::operator() |
( |
uint64_t |
local_supremum | ) |
|
|
inline |
Generate unsigned random 32-bit integer in the interval
[0,local_supremum).
References __scale_down(), and _M_mt.
int __gnu_parallel::_RandomNumber::__bits_left |
|
private |
uint64_t __gnu_parallel::_RandomNumber::__cache |
|
private |
std::tr1::mt19937 __gnu_parallel::_RandomNumber::_M_mt |
|
private |
uint64_t __gnu_parallel::_RandomNumber::_M_rand_sup |
|
private |
double __gnu_parallel::_RandomNumber::_M_rand_sup_reciprocal |
|
private |
uint64_t __gnu_parallel::_RandomNumber::_M_supremum |
|
private |
double __gnu_parallel::_RandomNumber::_M_supremum_reciprocal |
|
private |
The documentation for this class was generated from the following file: