public abstract class RandomVariateBase extends java.lang.Object implements RandomVariate
The base class for Simkit's random variate generator classes. It is
abstract because the generate()
method of RandomVariate
is not implemented. The easiest way to write a RandomVariate
is to
subclass and implement generate()
. It is also advised that subclasses
add accessor methods for their parameters using the set/get template.
Modifier and Type | Field and Description |
---|---|
protected RandomNumber |
rng
The supporting RandomNumber.
|
Constructor and Description |
---|
RandomVariateBase()
Creates a new RandomVariateBase with the default RandomNumber.
|
Modifier and Type | Method and Description |
---|---|
RandomNumber |
getRandomNumber()
Returns the instance of the supporting RandomVariate.
|
void |
setRandomNumber(RandomNumber rng)
Sets the supporting RandomNumber for this RandomVariate.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
generate, getParameters, setParameters
protected RandomNumber rng
public RandomVariateBase()
public void setRandomNumber(RandomNumber rng)
setRandomNumber
in interface RandomVariate
rng
- The RandomNumber
instance to use for Un(0, 1) random numbers.public RandomNumber getRandomNumber()
getRandomNumber
in interface RandomVariate
RandomNumber
instance currently being used.