Random Number Generator Functions
[Functions]


Functions

scalar Gauss (void)
 Generates a (pseudo-)random number with a Gaussian distribution.
scalar Ran (void)
 Generates a (pseudo-)random number between zero and one.
void SetGaussPars (scalar mean, scalar stddev)
 Sets the seed for the random number generation algorithm.
void SetRanSeed (scalar seed)
 Sets the seed for the random number generation algorithm.

Detailed Description

Functions that have to do with the generation of random numbers.

Function Documentation

scalar Gauss void   ) 
 

Generates a (pseudo-)random number with a Gaussian distribution.

Returns:
A (pseudo-)random number.
Since:
v1.4
This function is implemented using a procedure from the Numerical Recipies. The range of the values returned depends on the mean and variance set with the function SetGaussPars.

scalar Ran void   ) 
 

Generates a (pseudo-)random number between zero and one.

Returns:
A (pseudo-)random number between zero and one.
Since:
v1.4
This function is implemented using the ran3 procedure as described in the Numerical Recipies.

void SetGaussPars scalar  mean,
scalar  stddev
 

Sets the seed for the random number generation algorithm.

Parameters:
mean The mean of the Gaussian distribution.
stddev The standard deviation of the Gaussian distribution.
Returns:
Nothing.
Since:
v1.4

void SetRanSeed scalar  seed  ) 
 

Sets the seed for the random number generation algorithm.

Parameters:
seed The seed number. If this value is smaller than zero, a seed is generated from the computer clock.
Returns:
Nothing.
Since:
v1.4