scc
2022.4.0
SystemC components library
|
a mersenne-twister based random number generator More...
#include <mt19937_rng.h>
Static Public Member Functions | |
static void | seed (uint64_t new_seed=std::mt19937_64::default_seed) |
static void | enable_global_seed (bool enable) |
static uint64_t | uniform () |
template<typename T > | |
static T | uniform () |
static uint64_t | uniform (uint64_t min, uint64_t max) |
static double | normal () |
static double | lognormal () |
a mersenne-twister based random number generator
This random number generator provides various distribution of random numbers being specific to the SystemC process invoking the generator function. This makes the generator independent of the order of invocation in a delta cycle and allows to replay with the same seed
Definition at line 38 of file mt19937_rng.h.
|
static |
By default each SystemC process has its own MT rng with a modified seed based on the process name. If set to true each MT rng gets exactly the same seed thus producing the same sequence.
enable | use the same seed for all MT rng instances |
Definition at line 69 of file mt19937_rng.cpp.
|
inlinestatic |
generates the next random integer number with log normal distribution (similar to rand() )
Definition at line 99 of file mt19937_rng.h.
|
inlinestatic |
generates the next random double precision float number with normal distribution (similar to rand() )
Definition at line 90 of file mt19937_rng.h.
|
static |
Seeds the mersenne twister PRNG with the given value
new_seed |
Definition at line 62 of file mt19937_rng.cpp.
|
inlinestatic |
generates the next random integer number with uniform distribution (similar to rand() )
Definition at line 60 of file mt19937_rng.h.
|
inlinestatic |
generates the next random integer number with uniform distribution in the range of the given type
Definition at line 69 of file mt19937_rng.h.
|
inlinestatic |
generates the next random integer number with uniform distribution between (and including) min and max
min | the lower limit of the interval |
max | the upper limit of the interval |
Definition at line 80 of file mt19937_rng.h.