C# Class MyMediaLite.Util.Random

Draws random values from a normal distibuted using a simple rejection method
Inheritance: System.Random
Exibir arquivo Open project: zenogantner/MML-KDD

Public Methods

Method Description
GetInstance ( ) : Random

Gets the instance. If it does not exist yet, it will be created.

InitInstance ( int seed ) : void

Initializes the instance with a given random seed

NextExp ( double lambda ) : double

Nexts the exp

NextNormal ( ) : double

Get the next number from the standard normal distribution

NextNormal ( double mean, double stdev ) : double

Draw the next number from a normal distribution

Random ( ) : System

Default constructor

Random ( int seed ) : System

Creates a Random object initialized with a seed

Method Details

GetInstance() public static method

Gets the instance. If it does not exist yet, it will be created.
public static GetInstance ( ) : Random
return Random

InitInstance() public static method

Initializes the instance with a given random seed
public static InitInstance ( int seed ) : void
seed int a seed value
return void

NextExp() public method

Nexts the exp
public NextExp ( double lambda ) : double
lambda double
return double

NextNormal() public method

Get the next number from the standard normal distribution
public NextNormal ( ) : double
return double

NextNormal() public method

Draw the next number from a normal distribution
public NextNormal ( double mean, double stdev ) : double
mean double mean of the Gaussian
stdev double standard deviation of the Gaussian
return double

Random() public method

Default constructor
public Random ( ) : System
return System

Random() public method

Creates a Random object initialized with a seed
public Random ( int seed ) : System
seed int An integer for initializing the random number generator
return System