|
SSJ V. 1.1.9. |
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectumontreal.iro.lecuyer.randvar.RandomVariateGen
umontreal.iro.lecuyer.randvar.ErlangGen
public class ErlangGen
This class implements random variate generators for the Erlang distribution with parameters k > 0 and λ > 0. This Erlang random variable is the sum of k exponentials with parameter λ and has mean k/λ. Erlang random variates can also be obtained by generators from the gamma distribution.
No local copy of the parameters k and λ is maintained in this class. The (non-static) nextDouble method simply calls inverseF on the distribution.
| Constructor Summary | |
|---|---|
ErlangGen(RandomStream s,
ErlangDist dist)
Creates a new generator for the distribution dist and stream s. |
|
| Method Summary | |
|---|---|
double |
nextDouble()
Generates a random number from the continuous distribution contained in this object. |
static double |
nextDouble(RandomStream s,
int k,
double lambda)
Generates a new variate from the Erlang distribution with parameters k = k and λ = lambda, using stream s. |
| Methods inherited from class umontreal.iro.lecuyer.randvar.RandomVariateGen |
|---|
getDistribution, getStream, nextArrayOfDouble |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public ErlangGen(RandomStream s,
ErlangDist dist)
| Method Detail |
|---|
public double nextDouble()
RandomVariateGeninverseF
method of the distribution object.
Alternative generating methods are provided in subclasses.
nextDouble in class RandomVariateGen
public static double nextDouble(RandomStream s,
int k,
double lambda)
|
SSJ V. 1.1.9. |
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||