A pseudo random number generator using the linear congruential algorithm with the following parameters: More...
Public Types | |
typedef uint32_t | result_type |
Public Member Functions | |
Rand48 (uint32_t val=default_seed) | |
void | seed (uint32_t val=default_seed) |
void | discard (unsigned long long z) |
uint64_t | raw () |
uint32_t | operator() () |
Static Public Member Functions | |
static constexpr uint32_t | min () |
static constexpr uint32_t | max () |
Static Public Attributes | |
static constexpr result_type | default_seed = 1u |
A pseudo random number generator using the linear congruential algorithm with the following parameters:
Xn+1 = (aXn + c) mod m, where n >= 0 a = 0x5DEECE66D, c = 0xB m = 2**48
It delivers results identical to the lrand48()
function that is available on some systems.
typedef uint32_t result_type |
|
inlineexplicit |
|
inline |
Definition at line 106 of file Rand48.H.
Referenced by Random::Random().
|
staticconstexpr |
Copyright © 2011-2018 OpenFOAM | OPENFOAM® is a registered trademark of OpenCFD Ltd.