public class Well44497b extends AbstractWell
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.
Constructor and Description |
---|
Well44497b()
Creates a new random number generator.
|
Well44497b(int seed)
Creates a new random number generator using a single int seed.
|
Well44497b(int[] seed)
Creates a new random number generator using an int array seed.
|
Well44497b(long seed)
Creates a new random number generator using a single long seed.
|
Modifier and Type | Method and Description |
---|---|
protected int |
next(int bits)
Generate next pseudorandom number.
|
setSeed, setSeed, setSeed
clear, nextBoolean, nextBytes, nextDouble, nextFloat, nextGaussian, nextInt, nextInt, nextLong
public Well44497b()
The instance is initialized using the current time as the seed.
public Well44497b(int seed)
seed
- the initial seed (32 bits integer)public Well44497b(int[] seed)
seed
- the initial seed (32 bits integers array), if null
the seed of the generator will be related to the current timepublic Well44497b(long seed)
seed
- the initial seed (64 bits integer)protected int next(int bits)
This method is the core generation algorithm. It is used by all the public generation methods for the various
primitive types BitsStreamGenerator.nextBoolean()
, BitsStreamGenerator.nextBytes(byte[])
, BitsStreamGenerator.nextDouble()
, BitsStreamGenerator.nextFloat()
,
BitsStreamGenerator.nextGaussian()
, BitsStreamGenerator.nextInt()
, BitsStreamGenerator.next(int)
and BitsStreamGenerator.nextLong()
.
next
in class AbstractWell
bits
- number of random bits to produceCopyright © 2019 CNES. All rights reserved.