RandomIntSource
, RestorableUniformRandomProvider
, UniformRandomProvider
Well1024a
, Well19937a
, Well44497a
, Well512a
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 | 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 | Description |
---|---|---|
protected int |
index |
Current index in the bytes pool.
|
protected int[] |
v |
Bytes pool.
|
Modifier | Constructor | Description |
---|---|---|
protected |
AbstractWell(int k,
int[] seed) |
Creates an instance with the given
seed . |
Modifier and Type | Method | Description |
---|---|---|
protected byte[] |
getStateInternal() |
Creates a snapshot of the RNG state.
|
protected void |
setStateInternal(byte[] s) |
Resets the RNG to the given
state . |
checkIndex, checkStateSize, fillState, fillState, nextInt, nextLong, restoreState, saveState, toString
nextBoolean, nextBytes, nextBytes, nextDouble, nextFloat, nextInt, nextLong
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
next
protected 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 BaseProvider
protected void setStateInternal(byte[] s)
state
.setStateInternal
in class BaseProvider
s
- State (previously obtained by a call to
BaseProvider.getStateInternal()
).BaseProvider.checkStateSize(byte[],int)
Copyright © 2016–2018 The Apache Software Foundation. All rights reserved.