|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object
|
+--Utility.RandomNumber
|
+--Utility.Exponential
The Exponential class is used to generate random
variables from an exponential distribution.
The Exponential distribution is often used to model
inter-arrival times in a simulation.
This is a continuous distribution.
Tests Performed
1000 samples were generated and the means and variances
were examined. Subjectively, they seemed correct.
A goodness of fit test was performed with 100 samples
and 10 intervals. It succeeded about 19/20 times.
| Constructor Summary | |
Exponential(double mean)
The Exponential constructor initializes the exponential distribution by setting the distribution's mean. |
|
| Method Summary | |
double |
sampleDouble()
Generate a random variable, a double, from the exponential distribution. |
int |
sampleInt()
The sampleInt function should not be called for this continuous distribution. |
| Methods inherited from class Utility.RandomNumber |
goodnessOfFitTest, goodnessOfFitTest, randomMixer, resetRandomMixer, sample01 |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public Exponential(double mean)
mean - The mean of the exponential distribution.
The mean alone characterizes the exponential distribution.| Method Detail |
public double sampleDouble()
sampleDouble in class RandomNumberpublic int sampleInt()
sampleInt in class RandomNumber
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||