Represents a xorshift pseudo-random number generator with period 2^128-1.
The XorShift128Generator type bases upon the implementation presented in the CP article "A fast equivalent for System.Random" and the theoretical background on xorshift random number generators published by George Marsaglia in this paper "Xorshift RNGs".
Constructor | Description |
Full Usage:
XorShift128Generator()
|
Initializes a new instance of the XorShift128Generator class, using a time-dependent default seed value. |
Full Usage:
XorShift128Generator(seed)
Parameters:
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.
|
|
Full Usage:
XorShift128Generator(seed)
Parameters:
uint32
-
An unsigned number used to calculate a starting value for the pseudo-random number sequence.
|
|
Instance member | Description | ||||
Full Usage:
this.CanReset
Returns: bool
Modifiers: abstract |
Gets a value indicating whether the XorShift128Generator can be reset, so that it produces the same pseudo-random number sequence again.
|
||||
Full Usage:
this.Next
Returns: int
A 32-bit signed integer greater than or equal to 0, and less than Int32.MaxValue; that is,
the range of return values includes 0 but not Int32.MaxValue.
Modifiers: abstract |
|
||||
Full Usage:
this.Next
Parameters:
int
-
The exclusive upper bound of the random number to be generated.
maxValue must be greater than or equal to 0.
Returns: int
A 32-bit signed integer greater than or equal to 0, and less than maxValue; that is,
the range of return values includes 0 but not maxValue.
Modifiers: abstract |
Returns a nonnegative random number less than the specified maximum.
|
||||
Full Usage:
this.Next
Parameters:
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.
maxValue must be greater than or equal to minValue.
Returns: int
A 32-bit signed integer greater than or equal to minValue, and less than
maxValue; that is, the range of return values includes minValue but
not maxValue.
If minValue equals maxValue, minValue is returned.
Modifiers: abstract |
Returns a random number within the specified range.
|
||||
|
Returns a random Boolean value.
|
||||
Full Usage:
this.NextBytes
Parameters:
byte[]
-
An array of bytes to contain random numbers.
Modifiers: abstract |
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.
|
||||
Full Usage:
this.NextDouble
Returns: float
A double-precision floating point number greater than or equal to 0.0, and less than 1.0; that is,
the range of return values includes 0.0 but not 1.0.
Modifiers: abstract |
Returns a nonnegative floating point random number less than 1.0.
|
||||
Full Usage:
this.NextDouble
Parameters:
float
-
The exclusive upper bound of the random number to be generated.
maxValue must be greater than or equal to 0.0.
Returns: float
A double-precision floating point number greater than or equal to 0.0, and less than maxValue;
that is, the range of return values includes 0 but not maxValue.
Modifiers: abstract |
Returns a nonnegative floating point random number less than the specified maximum.
|
||||
Full Usage:
this.NextDouble
Parameters:
float
-
The inclusive lower bound of the random number to be generated.
The range between minValue and maxValue must be less than or equal to
Double.MaxValue
maxValue : float
-
The exclusive upper bound of the random number to be generated.
maxValue must be greater than or equal to minValue.
The range between minValue and maxValue must be less than or equal to
Double.MaxValue.
Returns: float
A double-precision floating point number greater than or equal to minValue, and less than
maxValue; that is, the range of return values includes minValue but
not maxValue.
If minValue equals maxValue, minValue is returned.
Modifiers: abstract |
Returns a floating point random number within the specified range.
|
||||
Full Usage:
this.NextInclusiveMaxValue
Returns: int
A 32-bit signed integer greater than or equal to 0, and less than or equal to Int32.MaxValue;
that is, the range of return values includes 0 and Int32.MaxValue.
|
|
||||
Full Usage:
this.NextUInt
Returns: uint32
A 32-bit unsigned integer greater than or equal to UInt32.MinValue and
less than or equal to UInt32.MaxValue.
|
Returns an unsigned random number.
|
||||
Full Usage:
this.Reset
Returns: bool
.
Modifiers: abstract |
|