public abstract class AbstractWell extends IntProvider
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.
| Modifier and Type | Class and Description |
|---|---|
protected static class |
AbstractWell.IndexTable
Inner class used to store the indirection index table which is fixed for a given
type of WELL class of pseudo-random number generator.
|
| Modifier and Type | Field and Description |
|---|---|
protected int |
index
Current index in the bytes pool.
|
protected int[] |
v
Bytes pool.
|
| Modifier | Constructor and Description |
|---|---|
protected |
AbstractWell(int k,
int[] seed)
Creates an instance with the given
seed. |
| Modifier and Type | Method and Description |
|---|---|
protected byte[] |
getStateInternal()
Creates a snapshot of the RNG state.
|
protected void |
setStateInternal(byte[] s)
Resets the RNG to the given
state. |
next, nextBoolean, nextBytes, nextBytes, nextDouble, nextFloat, nextInt, nextLongcheckIndex, checkStateSize, fillState, fillState, nextInt, nextLong, restoreState, saveState, toStringprotected int index
protected final int[] v
protected AbstractWell(int k,
int[] seed)
seed.k - Number of bits in the pool (not necessarily a multiple of 32).seed - Initial seed.protected byte[] getStateInternal()
getStateInternal in class BaseProviderprotected void setStateInternal(byte[] s)
state.setStateInternal in class BaseProviders - State (previously obtained by a call to
BaseProvider.getStateInternal()).BaseProvider.checkStateSize(byte[],int)Copyright © 2016 The Apache Software Foundation. All rights reserved.