Xorshift128p class
Random number generator based on xorshift128+ algorithm by S. Vigna.
There were at least two known versions of this algorithm.
With constants 23, 17, 26:
- in paper - Apr 2014
- in JavaScript V8 engine
- on Wikipedia - 2021
With constants 23, 18, 5:
- in paper - Dec 2015
- in paper - May 2016
- in JavaScript xorshift library
"the most recent set of constants according to the author of the algorithm are: 23, 18, and 5. Those are theoretically better than the initial set of numbers" >>
This class uses the most recent constants: 23, 18, 5.
- Inheritance
-
- Object
- RandomBase32
- RandomBase64
- Xorshift128p
Constructors
- Xorshift128p.new([int? seedA, int? seedB])
Properties
- boolCache ↔ int
-
getter/setter pairinherited
- boolCache_prevShift ↔ int
-
getter/setter pairinherited
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
nextBool(
) → bool -
Generates a random boolean value.
inherited
-
nextDouble(
) → double -
Generates a non-negative random floating point value uniformly distributed
in the range from 0.0, inclusive, to 1.0, exclusive.
inherited
-
nextDoubleBitcast(
) → double -
Generates a non-negative random floating point value uniformly distributed
in the range from 0.0, inclusive, to 1.0, exclusive.
inherited
-
nextFloat(
) → double -
Generates a random floating point value uniformly distributed
in the range from 0.0, inclusive, to 1.0, exclusive.
inherited
-
nextInt(
int max) → int -
Generates a non-negative random integer uniformly distributed in
the range from 0, inclusive, to
max
, exclusive.inherited -
nextRaw32(
) → int -
Generates a non-negative random integer uniformly distributed in the range
from 0 to (2^32)-1, both inclusive.
inherited
-
nextRaw53(
) → int -
Generates a non-negative random integer uniformly distributed in the range
from 0, inclusive, to 2^63, exclusive.
inherited
-
nextRaw64(
) → int -
Generates a non-negative random integer uniformly distributed in the range
from 0 to 2^64-1, both inclusive.
override
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Methods
-
seeded(
) → Xorshift128p