public class ExponentialVariate extends RandomVariateBase
Modifier and Type | Field and Description |
---|---|
private double |
mean
The mean of this Exponential Variate.
|
rng
Constructor and Description |
---|
ExponentialVariate()
Creates a new ExponentialVariate with a zero mean.
|
Modifier and Type | Method and Description |
---|---|
double |
generate()
Generate a random variate having this class's distribution.
|
double |
getMean() |
java.lang.Object[] |
getParameters()
Returns the mean of this exponential variate in a single element array.
|
void |
setMean(double mean)
Note that the value is the mean rather than the rate.
|
void |
setParameters(java.lang.Object... params)
Sets the mean of this Exponential Variate.
|
java.lang.String |
toString()
Returns a string containing the name and mean of this RandomVariate.
|
getRandomNumber, setRandomNumber
public ExponentialVariate()
public double generate()
RandomVariate
public void setParameters(java.lang.Object... params)
params
- mean as single element of array.java.lang.IllegalArgumentException
- If the array is not a single element, if
the element is not a Number, or if the mean is not positive.public java.lang.Object[] getParameters()
public void setMean(double mean)
mean
- the desired mean.java.lang.IllegalArgumentException
- If the given mean is not positive.public double getMean()
public java.lang.String toString()
toString
in class java.lang.Object