java.lang.Object
java.util.Random
org.apache.commons.math3.random.JDKRandomGenerator
simpa.acc.api.utils.FakeRandomGenerator
- All Implemented Interfaces:
Serializable
,RandomGenerator
,org.apache.commons.math3.random.RandomGenerator
public class FakeRandomGenerator
extends org.apache.commons.math3.random.JDKRandomGenerator
Imitates the random generator sampling, but actually returns fixed values
which repeats after n samples. Only the nextGaussian() method is implemented.
- 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
Constructors -
Method Summary
Methods inherited from class org.apache.commons.math3.random.JDKRandomGenerator
setSeed, setSeed
Methods inherited from class java.util.Random
doubles, doubles, doubles, doubles, from, ints, ints, ints, ints, longs, longs, longs, longs, nextBoolean, nextBytes, nextDouble, nextFloat, nextInt, nextInt, nextLong, setSeed
Methods inherited from class java.lang.Object
equals, 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
Methods inherited from interface org.apache.commons.math3.random.RandomGenerator
nextBoolean, nextBytes, nextDouble, nextFloat, nextInt, nextInt, nextLong, setSeed
-
Constructor Details
-
FakeRandomGenerator
public FakeRandomGenerator()
-
-
Method Details
-
isReplay
public boolean isReplay() -
setReplay
public void setReplay(boolean replay) -
nextGaussian
public double nextGaussian()Returns the next value from the stored values or generates a new one, depending on the replay mode.- Specified by:
nextGaussian
in interfaceRandomGenerator
- Specified by:
nextGaussian
in interfaceorg.apache.commons.math3.random.RandomGenerator
- Overrides:
nextGaussian
in classRandom
- Returns:
- The next value from the stored values.
-