IGLib
1.7.2
The IGLib base library for development of numerical, technical and business applications.
|
Gaussian random number generator. More...
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 |
Gaussian random number generator.
|
inline |
|
inlineprivate |
References IG.Num.RandomGenerator.Global.
|
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.
mean | The mean of the distribution. Default is zero. |
sigma | The standard deviation of the distribution. Default is one. |
Referenced by IG.Num.M.randgauss(), and IG.Num.MExt.RandGauss().
|
staticprotected |
|
staticprotected |
|
private |
|
private |
|
private |
|
staticget |
Global Gaussian random generator.
Referenced by IG.Num.M.randgauss(), and IG.Num.MExt.RandGauss().