C# Class AForge.Math.Random.UniformOneGenerator

Uniform random numbers generator in the range of [0, 1).

The random number generator generates uniformly distributed numbers in the range of [0, 1) - greater or equal to 0.0 and less than 1.0.

At this point the generator is based on the internal .NET generator, but may be rewritten to use faster generation algorithm.

Sample usage:

// create instance of random generator IRandomNumberGenerator generator = new UniformOneGenerator( ); // 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.

UniformOneGenerator ( )

Initializes a new instance of the UniformOneGenerator class.

Initializes random numbers generator with zero seed.

UniformOneGenerator ( int seed )

Initializes a new instance of the UniformOneGenerator 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

UniformOneGenerator() public method

Initializes a new instance of the UniformOneGenerator class.
Initializes random numbers generator with zero seed.
public UniformOneGenerator ( )

UniformOneGenerator() public method

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