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:
-
seed | A 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:
-
seed | An 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:
-
maxValue | The 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:
-
minValue | The inclusive lower bound of the generated random integer. |
maxValue | The 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.