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 | Field and Description |
|---|---|
| private static final int | K
Number of bits in the pool. |
| private static final int | M1
First parameter of the algorithm. |
| private static final int | M2
Second parameter of the algorithm. |
| private static final int | M3
Third parameter of the algorithm. |
| private static final long | serialVersionUID
Hides org. |
| Access | Constructor and Description |
|---|---|
| public | |
| public | Well19937a(int
the initial seed (32 bits integer) seed)Creates a new random number generator using a single int seed. |
| public | Well19937a(int[]
the initial seed (32 bits integers array), if null
the seed of the generator will be related to the current time seed)Creates a new random number generator using an int array seed. |
| public | Well19937a(long
the initial seed (64 bits integer) seed)Creates a new random number generator using a single long seed. |
| Modifier and Type | Method and Description |
|---|---|
| protected int | next(final int
number of random bits to produce bits)Implements abstract org. Generate next pseudorandom number. |
| K | back to summary |
|---|---|
| private static final int K Number of bits in the pool. | |
| M1 | back to summary |
|---|---|
| private static final int M1 First parameter of the algorithm. | |
| M2 | back to summary |
|---|---|
| private static final int M2 Second parameter of the algorithm. | |
| M3 | back to summary |
|---|---|
| private static final int M3 Third parameter of the algorithm. | |
| serialVersionUID | back to summary |
|---|---|
| private static final long serialVersionUID Hides org. Serializable version identifier. | |
| Well19937a | back to summary |
|---|---|
| public Well19937a() Creates a new random number generator. The instance is initialized using the current time as the seed. | |
| Well19937a | back to summary |
|---|---|
| public Well19937a(int seed) Creates a new random number generator using a single int seed.
| |
| Well19937a | back to summary |
|---|---|
| public Well19937a(int[] seed) Creates a new random number generator using an int array seed.
| |
| Well19937a | back to summary |
|---|---|
| public Well19937a(long seed) Creates a new random number generator using a single long seed.
| |
| next | back to summary |
|---|---|
| protected int next(final int bits) Implements abstract org. Doc from org. Generate next pseudorandom number. This method is the core generation algorithm. It is used by all the
public generation methods for the various primitive types
| |