RANDOM_NUMBERS


Function

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.

Dependencies

Module Variables
DEFINITIONS DP
IO_UNITS OUTPUT
LINEAR_ALGEBRA NORM, PROJECT_OUT, SCHMIDT_ORTHOGONALIZE


Public Variables

None.

Public Procedures

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.


RANDOM

There are no arguments for this function.

RANDOM_GAUSS

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.


RANDOM_INITIALIZE

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.


RANDOM_VECTOR

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.


Stability

Stable.



Back to the DYNAMO Home-Page.