NeuroLab
RandN Class Reference

An object which uses the randn function. More...

Inheritance diagram for RandN:

Public Member Functions

 RandN ()
 Construct.
 
 ~RandN ()
 Destruct.
 
double dRandN ()
 Retrieve random variable. More...
 
double dRandE ()
 Retrieve random variable. More...
 

Detailed Description

An object which uses the randn function.

This class implements a random variable with normal distribution (gaussian).

Member Function Documentation

double RandN::dRandE ( )

Retrieve random variable.

This function generates one random variable. The returend values are evenly distributed between 0 and 1.

double RandN::dRandN ( )

Retrieve random variable.

This function generates one random variable. The returend values are normally (Gaussian) distributed, with a mean of 0.0 and a variance of 1.0. The method used is the Polar-Masaglia method, which is the quickest known so far.