|
CAEN Utility
2.0.2
Utilities for CAEN projects
|
Pseudo-random number generator functions using 32-bit MT19937 by Matsumoto and Nishimura (1998). Equivalent to C++ std::mt19937 implementation.
More...
Functions | |
| int32_t | c_rand32_init (void) |
| void | c_rand32_deinit (void) |
| void | c_rand32_seed (uint32_t seed) |
| uint32_t | c_rand32_int (void) |
| double | c_rand (void) |
Pseudo-random number generator functions using 32-bit MT19937 by Matsumoto and Nishimura (1998). Equivalent to C++ std::mt19937 implementation.
5489, the 10000th consecutive invocation produces the value 4123659995, as required by the C++11 standard. | int32_t c_rand32_init | ( | void | ) |
Initialize memory for 32-bit MT19937. If already initialized, nothing is done.
Definition at line 173 of file CAENRandom.c.
| void c_rand32_deinit | ( | void | ) |
Free memory for 32-bit MT19937. If already deinitialized, nothing is done.
Definition at line 189 of file CAENRandom.c.
| void c_rand32_seed | ( | uint32_t | seed | ) |
Re-initializes the internal state sequence to pseudo-random values.
| [in] | seed | a seed |
Definition at line 225 of file CAENRandom.c.
| uint32_t c_rand32_int | ( | void | ) |
Get a randon integer number in range [0, UINT32_MAX]
Definition at line 293 of file CAENRandom.c.
| double c_rand | ( | void | ) |
Get a pseudo-random number in range [0, 1) as double Wrapper to c_rand32_int() * 2-32
Definition at line 331 of file CAENRandom.c.