메소드 | 설명 | |
---|---|---|
MersenneTwister ( ) : System |
Creates a new pseudo-random number generator with a default seed.
|
|
MersenneTwister ( |
Creates a new pseudo-random number generator with a given seed.
|
|
Next ( ) : |
Returns the next pseudo-random Int32.
|
|
Next ( |
Returns the next pseudo-random Int32 up to maxValue.
|
|
Next ( |
Returns the next pseudo-random Int32 at least minValue and up to maxValue.
|
|
NextBytes ( Byte buffer ) : void |
Fills a buffer with pseudo-random bytes.
|
|
NextDouble ( ) : Double |
Returns the next pseudo-random Double value. There are two common ways to create a double floating point using MT19937: using GenerateUInt32 and dividing by 0xFFFFFFFF + 1, or else generating two double words and shifting the first by 26 bits and adding the second. In a newer measurement of the randomness of MT19937 published in the journal "Monte Carlo Methods and Applications, Vol. 12, No. 5-6, pp. 385 – 393 (2006)" entitled "A Repetition Test for Pseudo-Random Number Generators", it was found that the 32-bit version of generating a double fails at the 95% confidence level when measuring for expected repetitions of a particular number in a sequence of numbers generated by the algorithm. Due to this, the 53-bit method is implemented here and the 32-bit method of generating a double is not. If, for some reason, the 32-bit method is needed, it can be generated by the following: |
|
NextDouble ( System.Boolean includeOne ) : Double |
Returns a pseudo-random number greater than or equal to zero, and either strictly less than one, or less than or equal to one, depending on the value of the given parameter.
|
|
NextDoublePositive ( ) : Double |
Returns a pseudo-random number greater than 0.0 and less than 1.0.
|
|
NextSingle ( ) : System.Single |
Returns a pseudo-random number between 0.0 and 1.0.
|
|
NextSingle ( System.Boolean includeOne ) : System.Single |
Returns a pseudo-random number greater than or equal to zero, and either strictly less than one, or less than or equal to one, depending on the value of the given boolean parameter.
|
|
NextSinglePositive ( ) : System.Single |
Returns a pseudo-random number greater than 0.0 and less than 1.0.
|
|
NextUInt32 ( ) : |
Returns the next pseudo-random UInt32.
|
|
NextUInt32 ( |
Returns the next pseudo-random UInt32 up to maxValue.
|
|
NextUInt32 ( |
Returns the next pseudo-random UInt32 at least minValue and up to maxValue.
|
메소드 | 설명 | |
---|---|---|
GenerateUInt32 ( ) : |
Generates a new pseudo-random UInt32.
|
메소드 | 설명 | |
---|---|---|
compute53BitRandom ( Double translate, Double scale ) : Double | ||
init ( |
||
temperingShiftL ( |
||
temperingShiftS ( |
||
temperingShiftT ( |
||
temperingShiftU ( |
public MersenneTwister ( |
||
seed | A value to use as a seed. | |
리턴 | System |
public Next ( |
||
maxValue | The maximum value of the pseudo-random number to create. | |
리턴 |
public Next ( |
||
minValue | The minimum value of the pseudo-random number to create. | |
maxValue | The maximum value of the pseudo-random number to create. | |
리턴 |
public NextDouble ( System.Boolean includeOne ) : Double | ||
includeOne | System.Boolean |
/// If |
리턴 | Double |
public NextSingle ( System.Boolean includeOne ) : System.Single | ||
includeOne | System.Boolean |
/// If |
리턴 | System.Single |
public NextUInt32 ( |
||
maxValue | /// The maximum value of the pseudo-random number to create. /// | |
리턴 |
public NextUInt32 ( |
||
minValue | The minimum value of the pseudo-random number to create. | |
maxValue | The maximum value of the pseudo-random number to create. | |
리턴 |