java.lang.Object
java.util.Random
org.kink_lang.kink.internal.mod.random.Xoshiro256StarStar
- All Implemented Interfaces:
Serializable
,RandomGenerator
The pseudo random number generator of xoshiro256**.
See http://prng.di.unimi.it/
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from interface java.util.random.RandomGenerator
RandomGenerator.ArbitrarilyJumpableGenerator, RandomGenerator.JumpableGenerator, RandomGenerator.LeapableGenerator, RandomGenerator.SplittableGenerator, RandomGenerator.StreamableGenerator
-
Constructor Summary
ConstructorDescriptionXoshiro256StarStar
(long s0, long s1, long s2, long s3) Constructs the PRNG with the given state. -
Method Summary
Methods inherited from class java.util.Random
doubles, doubles, doubles, doubles, ints, ints, ints, ints, longs, longs, longs, longs, nextDouble, nextFloat, nextGaussian, nextInt, nextInt, setSeed
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface java.util.random.RandomGenerator
isDeprecated, nextDouble, nextDouble, nextExponential, nextFloat, nextFloat, nextGaussian, nextInt, nextLong, nextLong
-
Constructor Details
-
Xoshiro256StarStar
public Xoshiro256StarStar(long s0, long s1, long s2, long s3) Constructs the PRNG with the given state. Precondition: state must not be all zero.- Parameters:
s0
- the first 64 bits.s1
- the second 64 bits.s2
- the third 64 bits.s3
- the fourth 64 bits.
-
-
Method Details
-
nextLong
public long nextLong()- Specified by:
nextLong
in interfaceRandomGenerator
- Overrides:
nextLong
in classRandom
-
nextBoolean
public boolean nextBoolean()- Specified by:
nextBoolean
in interfaceRandomGenerator
- Overrides:
nextBoolean
in classRandom
-
next
public int next(int bits) -
nextBytes
public void nextBytes(byte[] bytes) - Specified by:
nextBytes
in interfaceRandomGenerator
- Overrides:
nextBytes
in classRandom
-