| IGLib 1.7.2 The IGLib base library for development of numerical, technical and business applications.

- Main Page
- Namespaces
- Classes
- Files

- Class List
- Class Index
- Class Hierarchy
- Class Members

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Events Macros
Public Member Functions | Static Protected Attributes | Properties | Private Member Functions | Private Attributes | List of all members
IG.Num.RandomGaussian Class Reference

Gaussian random number generator. More...

Collaboration diagram for IG.Num.RandomGaussian:
[legend]

## 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 | ( |  | ) |
| inline private

References IG.Num.RandomGenerator.Global.

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

  mean | The mean of the distribution. Default is zero.
  sigma | The 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()
| static protected

RandomGaussian IG.Num.RandomGaussian._global
| static protected

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
| static get

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:

- igbase/numeric/RandomGaussian.cs