LevelS C++ support library
3.83
|
#include <planck_rng.h>
Public Member Functions | |
planck_rng (unsigned int x1=123456789, unsigned int y1=362436069, unsigned int z1=521288629, unsigned int w1=88675123) | |
void | seed (unsigned int x1=123456789, unsigned int y1=362436069, unsigned int z1=521288629, unsigned int w1=88675123) |
unsigned int | int_rand_uni () |
double | rand_uni () |
double | rand_gauss () |
double | rand_exp () |
C++ port of the xorshift generator xor128() described in Marsaglia, Journal of Statistical Software 2003, vol 8. It has a period of 2^128 - 1.
Definition at line 45 of file planck_rng.h.
|
inline |
Initializes the generator with 0 to 4 seed values.
Definition at line 80 of file planck_rng.h.
|
inline |
Re-initializes the generator with 0 to 4 seed values.
Definition at line 90 of file planck_rng.h.
|
inline |
Returns uniformly distributed random integer numbers from the interval [0;0xFFFFFFFF].
Definition at line 100 of file planck_rng.h.
|
inline |
Returns random numbers with Gaussian distribution (mean=0, sigma=1).
Uses rand_uni() internally.
Definition at line 118 of file planck_rng.h.
|
inline |
Returns exponentially distributed random numbers (mean=1, nonnegative)
Uses rand_uni() internally.
Definition at line 145 of file planck_rng.h.