scc  2022.4.0
SystemC components library
util::MT19937 Class Reference

a Mersenne-Twister pseudo 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 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 ()
 

Detailed Description

a Mersenne-Twister pseudo random number generator

Definition at line 31 of file mt19937_rng.h.

Member Function Documentation

◆ lognormal()

static double util::MT19937::lognormal ( )
inlinestatic

generates the next random integer number with log normal distribution (similar to rand() )

Returns

Definition at line 77 of file mt19937_rng.h.

◆ normal()

static double util::MT19937::normal ( )
inlinestatic

generates the next random double precision float number with normal distribution (similar to rand() )

Returns

Definition at line 69 of file mt19937_rng.h.

◆ seed()

static void util::MT19937::seed ( uint64_t  new_seed = std::mt19937_64::default_seed)
inlinestatic

Seeds the mersenne twister PRNG with the given value

Parameters
new_seed

Definition at line 37 of file mt19937_rng.h.

◆ uniform() [1/3]

static uint64_t util::MT19937::uniform ( )
inlinestatic

generates the next random integer number with uniform distribution (similar to rand() )

Returns

Definition at line 42 of file mt19937_rng.h.

◆ uniform() [2/3]

template<typename T >
static T util::MT19937::uniform ( )
inlinestatic

generates the next random integer number with uniform distribution in the range of the given type

Returns

Definition at line 50 of file mt19937_rng.h.

◆ uniform() [3/3]

static uint64_t util::MT19937::uniform ( uint64_t  min,
uint64_t  max 
)
inlinestatic

generates the next random integer number with uniform distribution between (and including) min and max

Parameters
minthe lower limit of the interval
maxthe upper limit of the interval
Returns

Definition at line 60 of file mt19937_rng.h.


The documentation for this class was generated from the following file: