Class Well44497a
java.lang.Object
org.apache.commons.rng.core.BaseProvider
org.apache.commons.rng.core.source32.IntProvider
org.apache.commons.rng.core.source32.AbstractWell
org.apache.commons.rng.core.source32.Well44497a
- All Implemented Interfaces:
RandomIntSource
,RestorableUniformRandomProvider
,UniformRandomProvider
- Direct Known Subclasses:
Well44497b
This class implements the WELL44497a 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:
- 1.0
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class org.apache.commons.rng.core.source32.AbstractWell
AbstractWell.IndexTable
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final int
Number of bits in the pool.private static final int
First parameter of the algorithm.private static final int
Second parameter of the algorithm.private static final int
Third parameter of the algorithm.private static final AbstractWell.IndexTable
The indirection index table.Fields inherited from class org.apache.commons.rng.core.source32.AbstractWell
index, v
-
Constructor Summary
Constructors -
Method Summary
Methods inherited from class org.apache.commons.rng.core.source32.AbstractWell
getStateInternal, setStateInternal
Methods inherited from class org.apache.commons.rng.core.source32.IntProvider
nextBoolean, nextBytes, nextBytes, nextBytesFill, nextDouble, nextInt, nextLong, resetCachedState
Methods inherited from class org.apache.commons.rng.core.BaseProvider
checkIndex, checkStateSize, composeStateInternal, extendSeed, extendSeed, fillState, fillState, restoreState, saveState, splitStateInternal, toString
-
Field Details
-
K
private static final int KNumber of bits in the pool.- See Also:
-
M1
private static final int M1First parameter of the algorithm.- See Also:
-
M2
private static final int M2Second parameter of the algorithm.- See Also:
-
M3
private static final int M3Third parameter of the algorithm.- See Also:
-
TABLE
The indirection index table.
-
-
Constructor Details
-
Well44497a
public Well44497a(int[] seed) Creates a new random number generator.- Parameters:
seed
- Initial seed.
-
-
Method Details
-
next
public int next()- Returns:
- the next random value.
-