MCScheduling 1.0
Set of Algorithms for Solving Mixed-Criticality Scheduling
Public Member Functions | Protected Member Functions
MCScheduling.Utils.CUniformRandom Class Reference

The (uniform random number generator) Mersenne Twister is a pseudorandom number generator developed in 1997 by Makoto Matsumoto and Takuji Nishimura. More...

List of all members.

Public Member Functions

 CUniformRandom ()
 Creates the Mersenne Twister random number generator, and initializes it with a default seed.
 CUniformRandom (ulong seed)
 Creates and initializes the Mersenne Twister by the specified seed value.
int Next ()
 Generates a random non-negative 32-bit integer.
int Next (int maxValue)
 Returns a random non-negative integer lesser then the specified value.
int Next (int minValue, int maxValue)
 Returns a random integer bigger or equal to the specified minValue, and lesser then the specified maxValue.
double NextDouble ()
 Returns a random decimal number in the [0,1) interval.

Protected Member Functions

 CUniformRandom (ulong[] seed)
 Creates and initializes the Mersenne Twister by the specified seed value.

Detailed Description

The (uniform random number generator) Mersenne Twister is a pseudorandom number generator developed in 1997 by Makoto Matsumoto and Takuji Nishimura.


Constructor & Destructor Documentation

MCScheduling.Utils.CUniformRandom.CUniformRandom ( ulong  seed)

Creates and initializes the Mersenne Twister by the specified seed value.

Parameters:
seedA number used to calculate a starting value for the pseudo-random number sequence.
MCScheduling.Utils.CUniformRandom.CUniformRandom ( ulong[]  seed) [protected]

Creates and initializes the Mersenne Twister by the specified seed value.

Parameters:
seedAn array whose values are used to calculate a starting value for the pseudo-random number sequence.

Member Function Documentation

int MCScheduling.Utils.CUniformRandom.Next ( )

Generates a random non-negative 32-bit integer.

Returns:
A random integer in the [0,2^32) interval.
int MCScheduling.Utils.CUniformRandom.Next ( int  maxValue)

Returns a random non-negative integer lesser then the specified value.

Parameters:
maxValueThe exclusive upper bound of the generated random integer.
Returns:
A random integer from the [0,maxValue) interval.
int MCScheduling.Utils.CUniformRandom.Next ( int  minValue,
int  maxValue 
)

Returns a random integer bigger or equal to the specified minValue, and lesser then the specified maxValue.

Parameters:
minValueThe inclusive lower bound of the generated random integer.
maxValueThe exclusive upper bound of the generated random integer.
Returns:
A random integer from the [minValue,maxValue) interval.
double MCScheduling.Utils.CUniformRandom.NextDouble ( )

Returns a random decimal number in the [0,1) interval.

Returns:
A random decimal number in the [0,1) interval.
 All Classes Namespaces Functions Variables Properties