org.apache.commons.math3.random
Class AbstractWell
- java.lang.Object
-
- org.apache.commons.math3.random.BitsStreamGenerator
-
- org.apache.commons.math3.random.AbstractWell
-
- All Implemented Interfaces:
- java.io.Serializable, RandomGenerator
- Direct Known Subclasses:
- Well1024a, Well19937a, Well19937c, Well44497a, Well44497b, Well512a
public abstract class AbstractWell extends BitsStreamGenerator implements java.io.Serializable
This abstract class implements the WELL class of pseudo-random number generator from François Panneton, Pierre L'Ecuyer and Makoto Matsumoto.This generator is described in a paper by François Panneton, Pierre L'Ecuyer and Makoto Matsumoto Improved Long-Period Generators Based on Linear Recurrences Modulo 2 ACM Transactions on Mathematical Software, 32, 1 (2006). The errata for the paper are in wellrng-errata.txt.
- Since:
- 2.2
- See Also:
- WELL Random number generator, Serialized Form
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description voidsetSeed(int seed)Reinitialize the generator as if just built with the given int seed.voidsetSeed(int[] seed)Reinitialize the generator as if just built with the given int array seed.voidsetSeed(long seed)Reinitialize the generator as if just built with the given long seed.-
Methods inherited from class org.apache.commons.math3.random.BitsStreamGenerator
clear, nextBoolean, nextBytes, nextBytes, nextDouble, nextFloat, nextGaussian, nextInt, nextInt, nextLong, nextLong
-
-
-
-
Method Detail
-
setSeed
public void setSeed(int seed)
Reinitialize the generator as if just built with the given int seed.The state of the generator is exactly the same as a new generator built with the same seed.
- Specified by:
setSeedin interfaceRandomGenerator- Specified by:
setSeedin classBitsStreamGenerator- Parameters:
seed- the initial seed (32 bits integer)
-
setSeed
public void setSeed(int[] seed)
Reinitialize the generator as if just built with the given int array seed.The state of the generator is exactly the same as a new generator built with the same seed.
- Specified by:
setSeedin interfaceRandomGenerator- Specified by:
setSeedin classBitsStreamGenerator- Parameters:
seed- the initial seed (32 bits integers array). If null the seed of the generator will be the system time plus the system identity hash code of the instance.
-
setSeed
public void setSeed(long seed)
Reinitialize the generator as if just built with the given long seed.The state of the generator is exactly the same as a new generator built with the same seed.
- Specified by:
setSeedin interfaceRandomGenerator- Specified by:
setSeedin classBitsStreamGenerator- Parameters:
seed- the initial seed (64 bits integer)
-
-
DMelt 3.0 © DataMelt by jWork.ORG