|
SSJ V. 2.6.2. |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object umontreal.iro.lecuyer.randvar.RandomVariateGen umontreal.iro.lecuyer.randvar.GammaGen 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/λ.
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. |
|
ErlangGen(RandomStream s,
int k)
Creates an Erlang random variate generator with parameters k and λ = 1, using stream s. |
|
ErlangGen(RandomStream s,
int k,
double lambda)
Creates an Erlang random variate generator with parameters k and λ = lambda, using stream s. |
Method Summary | |
---|---|
int |
getK()
Returns the parameter k of 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.GammaGen |
---|
getAlpha, getLambda, nextDouble |
Methods inherited from class umontreal.iro.lecuyer.randvar.RandomVariateGen |
---|
getDistribution, getStream, nextArrayOfDouble, nextDouble, setStream, toString |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public ErlangGen(RandomStream s, int k, double lambda)
public ErlangGen(RandomStream s, int k)
public ErlangGen(RandomStream s, ErlangDist dist)
Method Detail |
---|
public static double nextDouble(RandomStream s, int k, double lambda)
public int getK()
|
SSJ V. 2.6.2. |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |