|
CAEN Utility
2.0.2
Utilities for CAEN projects
|
Pseudo-random number generator functions using 64-bit MT19937 by Matsumoto and Nishimura (2000). Equivalent to C++ std::mt19937_64 implementation.
More...
Functions | |
| int32_t | c_rand64_init (void) |
| void | c_rand64_deinit (void) |
| void | c_rand64_seed (uint64_t seed) |
| uint64_t | c_rand64_int (void) |
| double | c_rand64 (void) |
| double | c_rand64_normal (void) |
Pseudo-random number generator functions using 64-bit MT19937 by Matsumoto and Nishimura (2000). Equivalent to C++ std::mt19937_64 implementation.
5489, the 10000th consecutive invocation produces the value 9981545732273789042, as required by the C++11 standard. | int32_t c_rand64_init | ( | void | ) |
Initialize memory for 64-bit MT19937. If already initialized, nothing is done.
Definition at line 199 of file CAENRandom.c.
| void c_rand64_deinit | ( | void | ) |
Free memory for 64-bit MT19937. If already deinitialized, nothing is done.
Definition at line 215 of file CAENRandom.c.
| void c_rand64_seed | ( | uint64_t | seed | ) |
Re-initializes the internal state sequence to pseudo-random values.
| [in] | seed | a seed |
Definition at line 240 of file CAENRandom.c.
| uint64_t c_rand64_int | ( | void | ) |
Get a randon integer number in range [0, UINT64_MAX]
Definition at line 312 of file CAENRandom.c.
| double c_rand64 | ( | void | ) |
Get a pseudo-random number in range [0, 1] as double Wrapper to c_rand64_int() * 2-64
Definition at line 336 of file CAENRandom.c.
| double c_rand64_normal | ( | void | ) |
Get a pseudo-random number normally distributed (zero mean, unit variance), Implements the Box-Muller transform with numbers from c_rand64_int().
Definition at line 341 of file CAENRandom.c.