Random_Numbers contain procedures for calculating random numbers.
The code for the calculation of the uniformly and normally-distributed random numbers was adapted from the code of the functions DUNI and DNOR in the package NMS.
Module | Variables |
---|---|
DEFINITIONS | DP |
IO_UNITS | OUTPUT |
LINEAR_ALGEBRA | NORM, PROJECT_OUT, SCHMIDT_ORTHOGONALIZE |
None.
There are three public functions and a single public subroutine in this module.
Function | Type | Purpose |
---|---|---|
RANDOM | Real | Return a uniformly-distributed random number in the range [0,1]. |
RANDOM_GAUSS | Real | Return a normally-distributed random number. |
RANDOM_VECTOR | Real | Return a vector of uniformly-distributed random numbers. |
Subroutine | Purpose |
---|---|
RANDOM_INITIALIZE | Initialize the random number seed. |
There are no arguments for this function.
Argument | Type | Intent | Optional | Purpose |
---|---|---|---|---|
MEAN | Real | In | No | The mean of the normal distribution. |
SD | Real | In | No | The standard deviation of the normal distribution. |
Argument | Type | Intent | Optional | Purpose |
---|---|---|---|---|
SEED0 | Integer | In | No | The initial random number seed. |
GAUSSIAN_SEED | Integer | In | Yes | The initial random number seed for normally-distributed random numbers. |
Argument | Type | Intent | Optional | Purpose |
---|---|---|---|---|
N | Integer | In | No | The number of random numbers to return. |
NORMALIZE | Logical | In | Yes | The normalization flag. |
ORTHOGONAL_TO | Real(:,:) | In | Yes | A set of vectors orthogonal to the random vector. |
Stable.