Package net.paulem.arcana.math
Class FastRandomJ17
java.lang.Object
net.paulem.arcana.math.FastRandom
net.paulem.arcana.math.FastRandomJ17
- All Implemented Interfaces:
Serializable,RandomGenerator
public class FastRandomJ17
extends net.paulem.arcana.math.FastRandom
implements RandomGenerator, Serializable
Java 17 extension of
FastRandom that implements the JDK's RandomGenerator interface,
so instances can be used anywhere a standard RandomGenerator is expected, and marks itself
with Serial for serialization.- 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 -
Field Summary
Fields inherited from class net.paulem.arcana.math.FastRandom
INSTANCE -
Constructor Summary
ConstructorsConstructorDescriptionCreates a new instance, seeded usingFastRandom's default seeding strategy.FastRandomJ17(long seed) Creates a new instance seeded from the given seed value. -
Method Summary
Methods inherited from class net.paulem.arcana.math.FastRandom
convertBytesToInt, convertBytesToInts, getJ17FastRandom, getSeed, main, next, nextBeta, nextBitSet, nextBoolean, nextBoolean, nextBytes, nextChiSq, nextChiSq, nextChiSq, nextDiscrete, nextDiscrete, nextDouble, nextExp, nextExp, nextExp, nextFloat, nextGamma, nextGamma, nextGamma, nextGamma, nextGaussian, nextGaussian, nextInt, nextInt, nextLong, nextPoisson, nextPoisson, nextUniform, nextUniform, of, oldNextGammaMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface java.util.random.RandomGenerator
doubles, doubles, doubles, doubles, ints, ints, ints, ints, isDeprecated, longs, longs, longs, longs, nextBoolean, nextBytes, nextDouble, nextDouble, nextDouble, nextExponential, nextFloat, nextFloat, nextFloat, nextGaussian, nextGaussian, nextInt, nextInt, nextInt, nextLong, nextLong, nextLong
-
Constructor Details
-
FastRandomJ17
public FastRandomJ17()Creates a new instance, seeded usingFastRandom's default seeding strategy. -
FastRandomJ17
public FastRandomJ17(long seed) Creates a new instance seeded from the given seed value.- Parameters:
seed- the seed used to initialize this generator
-