Takes two uniformly distributed deviates within the unit circle, and transforms them into two independently distributed normal deviates using the Box-Muller transformation.
More...
|
| GaussianDistribution (int seed) |
|
| GaussianDistribution () |
|
double | RandomGauss (double mu=0, double sigma=1) |
| Obtains normally (Gaussian) distrubuted 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...
|
|
Takes two uniformly distributed deviates within the unit circle, and transforms them into two independently distributed normal deviates using the Box-Muller transformation.
Definition at line 12 of file GaussianDistribution.cs.
◆ GaussianDistribution() [1/2]
GaussianDistribution.GaussianDistribution |
( |
int |
seed | ) |
|
|
inline |
◆ GaussianDistribution() [2/2]
GaussianDistribution.GaussianDistribution |
( |
| ) |
|
|
inline |
◆ RandomGauss()
double GaussianDistribution.RandomGauss |
( |
double |
mu = 0 , |
|
|
double |
sigma = 1 |
|
) |
| |
|
inline |
Obtains normally (Gaussian) distrubuted 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
-
mu | The mean of the distribution. Default is zero |
sigma | The standard deviation of the distribution. Default is one. |
- Returns
Definition at line 35 of file GaussianDistribution.cs.
◆ temp1
double GaussianDistribution.temp1 |
|
private |
◆ temp2
double GaussianDistribution.temp2 |
|
private |
◆ u1
double GaussianDistribution.u1 |
|
private |
◆ u2
double GaussianDistribution.u2 |
|
private |
The documentation for this class was generated from the following file: