C# Class AForge.Math.Random.ExponentialGenerator

Exponential random numbers generator.

The random number generator generates exponential random numbers with specified rate value (lambda).

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

Sample usage:

// create instance of random generator IRandomNumberGenerator generator = new ExponentialGenerator( 5 ); // generate random number float randomNumber = generator.Next( );
Inheritance: IRandomNumberGenerator
Exibir arquivo Open project: atosorigin/Kinect

Public Methods

Method Description
ExponentialGenerator ( double rate ) : System

Initializes a new instance of the ExponentialGenerator class.

ExponentialGenerator ( double rate, int seed ) : System

Initializes a new instance of the ExponentialGenerator class.

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.

Method Details

ExponentialGenerator() public method

Initializes a new instance of the ExponentialGenerator class.
Rate value should be greater than zero.
public ExponentialGenerator ( double rate ) : System
rate double Rate value.
return System

ExponentialGenerator() public method

Initializes a new instance of the ExponentialGenerator class.
Rate value should be greater than zero.
public ExponentialGenerator ( double rate, int seed ) : System
rate double Rate value (inverse mean).
seed int Seed value to initialize random numbers generator.
return System

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