C# Class MyMediaLite.Util.Random

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

Méthodes publiques

Méthode 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 méthode

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

InitInstance() public static méthode

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

NextExp() public méthode

Nexts the exp
public NextExp ( double lambda ) : double
lambda double
Résultat double

NextNormal() public méthode

Get the next number from the standard normal distribution
public NextNormal ( ) : double
Résultat double

NextNormal() public méthode

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
Résultat double

Random() public méthode

Default constructor
public Random ( ) : System
Résultat System

Random() public méthode

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