Class DevRandom
java.lang.Object
java.util.Random
net.sf.colossus.util.DevRandom
- All Implemented Interfaces:
Serializable, RandomGenerator
Class DevRandom generates random bits (same interface as class Random).
Which random data source to use can be specified by providing a
property called "net.sf.colossus.randomFile" (see randomPropertyName)
or as argument to the constructor.
If no special source is specified or the specified source is unreachable
then it falls back on the regular java Random class.
- Author:
- Romain Dolbeau, David Ripton
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from interface RandomGenerator
RandomGenerator.ArbitrarilyJumpableGenerator, RandomGenerator.JumpableGenerator, RandomGenerator.LeapableGenerator, RandomGenerator.SplittableGenerator, RandomGenerator.StreamableGenerator -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate Stringprivate voidinit()protected intnext(int bits) private booleantryOneSource(String src) Methods inherited from class Random
doubles, doubles, doubles, doubles, from, ints, ints, ints, ints, longs, longs, longs, longs, nextBoolean, nextBytes, nextDouble, nextFloat, nextGaussian, nextInt, nextInt, nextLong, setSeedMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface RandomGenerator
equiDoubles, isDeprecated, nextDouble, nextDouble, nextExponential, nextFloat, nextFloat, nextGaussian, nextInt, nextLong, nextLong
-
Field Details
-
LOGGER
-
PRNG
- See Also:
-
source
-
randomSource
-
randStream
-
randomPropertyName
- See Also:
-
randomPropertySource
-
-
Constructor Details
-
DevRandom
public DevRandom() -
DevRandom
-
-
Method Details
-
getRandomSourceFromProperties
-
tryOneSource
-
init
private void init() -
next
-