Package jdistlib.rng
Class RandomEngine
java.lang.Object
java.util.Random
jdistlib.rng.RandomEngine
- All Implemented Interfaces:
Serializable,RandomGenerator
- Direct Known Subclasses:
MersenneTwister,MersenneTwisterSafe,RandomCMWC,RandomWELL44497b
- 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 -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionabstract RandomEngineclone()longgetSeed()protected intnext(int bits) Route inherited Random methods through this engine's state.abstract doubleabstract floatabstract doubleabstract intnextInt()intnextInt(int n) Uniform bounded draw using rejection to avoid modulo bias.abstract longnextLong()longnextLong(long n) doublerandom()voidsetSeed(long seed) Methods inherited from class java.util.Random
doubles, doubles, doubles, doubles, from, ints, ints, ints, ints, longs, longs, longs, longs, nextBoolean, nextBytesMethods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface java.util.random.RandomGenerator
isDeprecated, nextDouble, nextDouble, nextExponential, nextFloat, nextFloat, nextGaussian, nextInt, nextLong
-
Field Details
-
mSeed
protected long mSeed
-
-
Constructor Details
-
RandomEngine
public RandomEngine()
-
-
Method Details
-
setSeed
public void setSeed(long seed) -
getSeed
public long getSeed() -
nextGaussian
public abstract double nextGaussian()- Specified by:
nextGaussianin interfaceRandomGenerator- Overrides:
nextGaussianin classRandom
-
nextDouble
public abstract double nextDouble()- Specified by:
nextDoublein interfaceRandomGenerator- Overrides:
nextDoublein classRandom
-
nextFloat
public abstract float nextFloat()- Specified by:
nextFloatin interfaceRandomGenerator- Overrides:
nextFloatin classRandom
-
nextInt
public abstract int nextInt()- Specified by:
nextIntin interfaceRandomGenerator- Overrides:
nextIntin classRandom
-
nextInt
public int nextInt(int n) Uniform bounded draw using rejection to avoid modulo bias.- Specified by:
nextIntin interfaceRandomGenerator- Overrides:
nextIntin classRandom
-
nextLong
public abstract long nextLong()- Specified by:
nextLongin interfaceRandomGenerator- Overrides:
nextLongin classRandom
-
nextLong
public long nextLong(long n) -
next
protected int next(int bits) Route inherited Random methods through this engine's state. -
random
public double random() -
clone
-