Class RNG#

Class Documentation#

class RNG#

Class handles random numbers in the system.

Public Functions

inline RNG(unsigned int seed)#

Constructor (initialize random number generator)

inline ~RNG()#

Destructor.

inline real drnd()#

Get a random number between 0 and 1 drawn from an uniform distribution

Returns:

random number between 0 and 1

inline real gauss_rng(real sigma = 1.0, real mu = 0.0)#

Return a random number from a Gaussian distribution with a given standard deviation

Parameters:

sigma – standard deviation

inline int lrnd(int N)#

Get an integer random number between 0 and N drawn from an uniform distribution

Parameters:

N – upper bound for the interval

Returns:

integer random number between 0 and N