public class DummyGenerator extends java.lang.Object implements RandomNumber, java.lang.Cloneable
Constructor and Description |
---|
DummyGenerator()
Creates a new instance of DummyGenerator
|
Modifier and Type | Method and Description |
---|---|
java.lang.Object |
clone() |
double |
draw()
Draws a random number and returns it as U(0,1)
|
long |
drawLong()
Draws a random number and returns it as an integer.
|
double |
getMultiplier()
Returns the value for this RandomNumber needed to scale
a number produced by drawLong to result in U(0,1).
|
long |
getSeed()
Returns the current (not original) seed for this RandomNumber.
|
long[] |
getSeeds()
Gets the current (not original) value of the seeds for this RandomNumber.
|
void |
resetSeed()
Resets seed to last setSeed() value
|
void |
setSeed(long seed)
Set the random number seed for this RandomNumber.
|
void |
setSeeds(long[] seed)
Sets the seeds of this RandomNumber to the given values.
|
public double draw()
RandomNumber
draw
in interface RandomNumber
public long drawLong()
RandomNumber
drawLong
in interface RandomNumber
public long getSeed()
RandomNumber
getSeed
in interface RandomNumber
public long[] getSeeds()
RandomNumber
getSeeds
in interface RandomNumber
public void resetSeed()
resetSeed
in interface RandomNumber
public void setSeed(long seed)
RandomNumber
setSeed
in interface RandomNumber
seed
- The new random number seedpublic void setSeeds(long[] seed)
RandomNumber
setSeeds
in interface RandomNumber
seed
- The new array of seedspublic java.lang.Object clone()
clone
in class java.lang.Object
public double getMultiplier()
RandomNumber
getMultiplier
in interface RandomNumber