public class PooledGenerator extends java.lang.Object implements RandomNumber
Pooled
,
PooledXORGenerator
Modifier and Type | Field and Description |
---|---|
static int |
MASK
Deprecated.
|
static double |
MULTIPLICATIVE_FACTOR
Deprecated.
|
static int |
MULTIPLIER
Deprecated.
|
private long[] |
originalSeeds
Deprecated.
|
static long |
SCALE_FACTOR
Deprecated.
|
private long[] |
seeds
Deprecated.
|
static int |
SHIFT_LEFT
Deprecated.
|
static int |
SHIFT_RIGHT
Deprecated.
|
Constructor and Description |
---|
PooledGenerator()
Deprecated.
Use PooledXORGenerator instead
|
Modifier and Type | Method and Description |
---|---|
double |
draw()
Deprecated.
Draws a random number and returns it as U(0,1)
|
long |
drawLong()
Deprecated.
Use PooledXORGenerator instead
|
double |
getMultiplier()
Deprecated.
Returns the value for this RandomNumber needed to scale
a number produced by drawLong to result in U(0,1).
|
long |
getSeed()
Deprecated.
Only the LCG seed is returned - use
getSeeds() to get both. |
long[] |
getSeeds()
Deprecated.
Gets the current (not original) value of the seeds for this RandomNumber.
|
void |
resetSeed()
Deprecated.
Resets seed to last setSeed() value
|
void |
setSeed(long seed)
Deprecated.
Both the LCG and the Tausworth seeds are set to the same value.
|
void |
setSeeds(long[] seed)
Deprecated.
Sets the seeds of this RandomNumber to the given values.
|
java.lang.String |
toString()
Deprecated.
|
public static final int MULTIPLIER
public static final int MASK
public static final int SHIFT_RIGHT
public static final int SHIFT_LEFT
public static final long SCALE_FACTOR
public static final double MULTIPLICATIVE_FACTOR
private long[] originalSeeds
private long[] seeds
public PooledGenerator()
public void setSeed(long seed)
setSeed
in interface RandomNumber
seed
- The new random number seedpublic long getSeed()
getSeeds()
to get both.getSeed
in interface RandomNumber
public void resetSeed()
resetSeed
in interface RandomNumber
public void setSeeds(long[] seed)
RandomNumber
setSeeds
in interface RandomNumber
seed
- The new array of seedspublic long[] getSeeds()
RandomNumber
getSeeds
in interface RandomNumber
public long drawLong()
drawLong
in interface RandomNumber
public java.lang.String toString()
toString
in class java.lang.Object
public double draw()
RandomNumber
draw
in interface RandomNumber
public double getMultiplier()
RandomNumber
getMultiplier
in interface RandomNumber