public class RenewalProcessVariate extends java.lang.Object implements RandomVariate
Modifier and Type | Field and Description |
---|---|
protected RandomVariate |
interarrivalTime
The supporting RandomVariate used to generate the interarrival times.
|
protected double |
lastTime
Holds the value of the last arrival time.
|
Constructor and Description |
---|
RenewalProcessVariate()
Creates new RenewalProcessVariate with no supporting RandomVariate specified.
|
Modifier and Type | Method and Description |
---|---|
double |
generate()
Generate the next arrival time.
|
RandomVariate |
getInterarrivalTime() |
java.lang.Object[] |
getParameters()
Returns a single element array containing the instance of the
interarrival time RandomVariate.
|
RandomNumber |
getRandomNumber()
Returns the instance of the supporting RandomNumber.
|
void |
setInterarrivalTime(RandomVariate rv) |
void |
setParameters(java.lang.Object... params)
Sets the RandomVariate used to generate the interarrival times.
|
void |
setRandomNumber(RandomNumber rng)
Sets the supporting RandomNumber object
|
protected RandomVariate interarrivalTime
protected double lastTime
public RenewalProcessVariate()
public RandomNumber getRandomNumber()
getRandomNumber
in interface RandomVariate
public void setRandomNumber(RandomNumber rng)
setRandomNumber
in interface RandomVariate
rng
- The RandomNumber instance supporting the generating algorithmpublic java.lang.Object[] getParameters()
getParameters
in interface RandomVariate
public void setParameters(java.lang.Object... params)
setParameters
in interface RandomVariate
params
- A single element array containing an instance of a RandomVariate.java.lang.IllegalArgumentException
- If the array does not contain exactly 1
element or if the element is not a RandomVariate.public double generate()
generate
in interface RandomVariate
public void setInterarrivalTime(RandomVariate rv)
rv
- the RandomVariate used to generate the interarrival times.
Note: the instance is passed in, not copied.public RandomVariate getInterarrivalTime()