Method | Description | |
---|---|---|
MT19937Generator ( ) : System |
Initializes a new instance of the MT19937Generator class, using a time-dependent default seed value.
|
|
MT19937Generator ( int seed ) : System |
Initializes a new instance of the MT19937Generator class, using the specified seed value.
|
|
MT19937Generator ( uint seed ) : System |
Initializes a new instance of the MT19937Generator class, using the specified seed value.
|
|
Next ( ) : int |
Returns a nonnegative random number less than MaxValue.
|
|
Next ( int maxValue ) : int |
Returns a nonnegative random number less than the specified maximum.
|
|
Next ( int minValue, int maxValue ) : int |
Returns a random number within the specified range.
|
|
NextBoolean ( ) : bool |
Returns a random Boolean value. Buffers 32 random bits (1 uint) for future calls, so a new random number is only generated every 32 calls. |
|
NextBytes ( byte buffer ) : void |
Fills the elements of a specified array of bytes with random numbers. Each element of the array of bytes is set to a random number greater than or equal to 0, and less than or equal to Byte.MaxValue. |
|
NextDouble ( ) : double |
Returns a nonnegative floating point random number less than 1.0.
|
|
NextDouble ( double maxValue ) : double |
Returns a nonnegative floating point random number less than the specified maximum.
|
|
NextDouble ( double minValue, double maxValue ) : double |
Returns a floating point random number within the specified range.
|
|
NextInclusiveMaxValue ( ) : int |
Returns a nonnegative random number less than or equal to MaxValue.
|
|
NextUInt ( ) : uint |
Returns an unsigned random number.
|
|
Reset ( ) : bool |
Resets the MT19937Generator, so that it produces the same pseudo-random number sequence again.
|
Method | Description | |
---|---|---|
GenerateNUInts ( ) : void |
Generates MT19937Generator.N unsigned random numbers. Generated random numbers are 32-bit unsigned integers greater than or equal to UInt32.MinValue and less than or equal to UInt32.MaxValue. |
|
ResetBySeedArray ( ) : void |
Extends resetting of the MT19937Generator using the seedArray.
|
|
ResetGenerator ( ) : void |
Resets the MT19937Generator, so that it produces the same pseudo-random number sequence again.
|
public MT19937Generator ( int seed ) : System | ||
seed | int | /// A number used to calculate a starting value for the pseudo-random number sequence. /// If a negative number is specified, the absolute value of the number is used. /// |
return | System |
public MT19937Generator ( uint seed ) : System | ||
seed | uint | /// An unsigned number used to calculate a starting value for the pseudo-random number sequence. /// |
return | System |
public Next ( int maxValue ) : int | ||
maxValue | int |
/// The exclusive upper bound of the random number to be generated.
/// |
return | int |
public Next ( int minValue, int maxValue ) : int | ||
minValue | int | /// The inclusive lower bound of the random number to be generated. /// |
maxValue | int |
/// The exclusive upper bound of the random number to be generated.
/// |
return | int |
public NextBytes ( byte buffer ) : void | ||
buffer | byte | An array of bytes to contain random numbers. |
return | void |
public NextDouble ( double maxValue ) : double | ||
maxValue | double |
/// The exclusive upper bound of the random number to be generated.
/// |
return | double |
public NextDouble ( double minValue, double maxValue ) : double | ||
minValue | double |
/// The inclusive lower bound of the random number to be generated.
/// The range between |
maxValue | double |
/// The exclusive upper bound of the random number to be generated.
/// |
return | double |