|
Uncommons Maths API (Version 1.2.3) |
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.uncommons.maths.random.ExponentialGenerator
public class ExponentialGenerator
Continuous random sequence that follows an exponential distribution.
| Constructor Summary | |
|---|---|
ExponentialGenerator(double rate,
Random rng)
Creates a generator of exponentially-distributed values from a distribution with the specified rate. |
|
ExponentialGenerator(NumberGenerator<Double> rate,
Random rng)
Creates a generator of exponentially-distributed values from a distribution with a rate controlled by the specified generator parameter. |
|
| Method Summary | |
|---|---|
Double |
nextValue()
Generate the next exponential value from the current value of rate. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public ExponentialGenerator(NumberGenerator<Double> rate,
Random rng)
rate - A number generator that provides values to use as the rate for
the exponential distribution. This generator must only return non-zero, positive
values.rng - The source of randomness used to generate the exponential values.
public ExponentialGenerator(double rate,
Random rng)
rate - The rate (lamda) of the exponential distribution.rng - The source of randomness used to generate the exponential values.| Method Detail |
|---|
public Double nextValue()
nextValue in interface NumberGenerator<Double>
|
Uncommons Maths API (Version 1.2.3) |
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||