IGLib  1.7.2
The IGLib base library for development of numerical, technical and business applications.
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Events Macros
IG.Num.RandomGaussian Class Reference

Gaussian random number generator. More...

+ Collaboration diagram for IG.Num.RandomGaussian:

Public Member Functions

 RandomGaussian (IRandomGenerator random=null)
 
double NextGaussian (double mean=0, double sigma=1)
 Obtains normally (Gaussian) distributed random numbers, using the Box-Muller transformation. This transformation takes two uniformly distributed deviates within the unit circle, and transforms them into two independently distributed normal deviates. More...
 

Static Protected Attributes

static object _lockStatic = new object()
 
static RandomGaussian _global
 

Properties

static RandomGaussian Global [get]
 Global Gaussian random generator. More...
 

Private Member Functions

void Test ()
 

Private Attributes

bool _hasDeviate
 
double _storedDeviate
 
readonly IRandomGenerator _random
 

Detailed Description

Gaussian random number generator.

Constructor & Destructor Documentation

IG.Num.RandomGaussian.RandomGaussian ( IRandomGenerator  random = null)
inline

Member Function Documentation

void IG.Num.RandomGaussian.Test ( )
inlineprivate
double IG.Num.RandomGaussian.NextGaussian ( double  mean = 0,
double  sigma = 1 
)
inline

Obtains normally (Gaussian) distributed random numbers, using the Box-Muller transformation. This transformation takes two uniformly distributed deviates within the unit circle, and transforms them into two independently distributed normal deviates.

Parameters
meanThe mean of the distribution. Default is zero.
sigmaThe standard deviation of the distribution. Default is one.
Returns

Referenced by IG.Num.M.randgauss(), and IG.Num.MExt.RandGauss().

Member Data Documentation

object IG.Num.RandomGaussian._lockStatic = new object()
staticprotected
RandomGaussian IG.Num.RandomGaussian._global
staticprotected
bool IG.Num.RandomGaussian._hasDeviate
private
double IG.Num.RandomGaussian._storedDeviate
private
readonly IRandomGenerator IG.Num.RandomGaussian._random
private

Property Documentation

RandomGaussian IG.Num.RandomGaussian.Global
staticget

Global Gaussian random generator.

Referenced by IG.Num.M.randgauss(), and IG.Num.MExt.RandGauss().


The documentation for this class was generated from the following file: