|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
java.lang.ObjectRandomExponential
public class RandomExponential
Class for sampling randomly from the Exponential distribution with a specified mean.
| Constructor Summary | |
|---|---|
RandomExponential(double mean)
Create RNG with no seed, samples from exponential distribution with given mean. |
|
RandomExponential(int seed,
double mean)
Create RNG with specified seed, samples from exponential distribution with given mean. |
|
| Method Summary | |
|---|---|
double |
nextDouble()
Take a sample from the distribution. |
double |
nextDouble(double min,
double max)
Take a sample from the distribution. |
int |
nextInt()
Take a sample from the distribution. |
int |
nextInt(int min,
int max)
Take a sample from the distribution. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public RandomExponential(double mean)
mean - Mean (average) of the distribution.
public RandomExponential(int seed,
double mean)
seed - int seed value, guarantees fixed sequence.mean - Mean (average) of the distribution.| Method Detail |
|---|
public double nextDouble()
public double nextDouble(double min,
double max)
min - Low end of range of acceptable values.max - High end of range of acceptable values.
public int nextInt()
public int nextInt(int min,
int max)
min - Low end of range of acceptable values.max - High end of range of acceptable values.
|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||