C# Class AForge.Math.Random.StandardGenerator

Standard random numbers generator.

The random number generator generates gaussian random numbers with zero mean and standard deviation of one. The generator implements polar form of the Box-Muller transformation.

The generator uses UniformOneGenerator generator as a base to generate random numbers.

Sample usage:

// create instance of random generator IRandomNumberGenerator generator = new StandardGenerator( ); // generate random number float randomNumber = generator.Next( );
Inheritance: IRandomNumberGenerator
Datei anzeigen Open project: atosorigin/Kinect Class Usage Examples

Public Methods

Method Description
Next ( ) : double

Generate next random number.

SetSeed ( int seed ) : void

Set seed of the random numbers generator.

Resets random numbers generator initializing it with specified seed value.

StandardGenerator ( )

Initializes a new instance of the StandardGenerator class.

StandardGenerator ( int seed )

Initializes a new instance of the StandardGenerator class.

Method Details

Next() public method

Generate next random number.
public Next ( ) : double
return double

SetSeed() public method

Set seed of the random numbers generator.
Resets random numbers generator initializing it with specified seed value.
public SetSeed ( int seed ) : void
seed int Seed value.
return void

StandardGenerator() public method

Initializes a new instance of the StandardGenerator class.
public StandardGenerator ( )

StandardGenerator() public method

Initializes a new instance of the StandardGenerator class.
public StandardGenerator ( int seed )
seed int Seed value to initialize random numbers generator.