Package org.apache.commons.math.random
Class JDKRandomGenerator
- java.lang.Object
-
- java.util.Random
-
- org.apache.commons.math.random.JDKRandomGenerator
-
- All Implemented Interfaces:
java.io.Serializable
,RandomGenerator
public class JDKRandomGenerator extends java.util.Random implements RandomGenerator
Extension ofjava.util.Random
to implementRandomGenerator
.- Since:
- 1.1
- Version:
- $Revision: 811685 $ $Date: 2009-09-05 19:36:48 +0200 (sam. 05 sept. 2009) $
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description JDKRandomGenerator()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
setSeed(int seed)
Sets the seed of the underlying random number generator using anint
seed.void
setSeed(int[] seed)
Sets the seed of the underlying random number generator using anint
array seed.-
Methods inherited from class java.util.Random
doubles, doubles, doubles, doubles, ints, ints, ints, ints, longs, longs, longs, longs, next, nextBoolean, nextBytes, nextDouble, nextFloat, nextGaussian, nextInt, nextInt, nextLong, setSeed
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.apache.commons.math.random.RandomGenerator
nextBoolean, nextBytes, nextDouble, nextFloat, nextGaussian, nextInt, nextInt, nextLong, setSeed
-
-
-
-
Method Detail
-
setSeed
public void setSeed(int seed)
Sets the seed of the underlying random number generator using anint
seed.Sequences of values generated starting with the same seeds should be identical.
- Specified by:
setSeed
in interfaceRandomGenerator
- Parameters:
seed
- the seed value
-
setSeed
public void setSeed(int[] seed)
Sets the seed of the underlying random number generator using anint
array seed.Sequences of values generated starting with the same seeds should be identical.
- Specified by:
setSeed
in interfaceRandomGenerator
- Parameters:
seed
- the seed value
-
-