SSJ
V. 1.2.5.

umontreal.iro.lecuyer.randvar
Class ErlangGen

java.lang.Object
  extended by umontreal.iro.lecuyer.randvar.RandomVariateGen
      extended by umontreal.iro.lecuyer.randvar.GammaGen
          extended by umontreal.iro.lecuyer.randvar.ErlangGen
Direct Known Subclasses:
ErlangConvolutionGen

public class ErlangGen
extends GammaGen

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/λ.

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
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
nextDouble, nextDouble
 
Methods inherited from class umontreal.iro.lecuyer.randvar.RandomVariateGen
getDistribution, getStream, nextArrayOfDouble, setStream
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ErlangGen

public ErlangGen(RandomStream s,
                 ErlangDist dist)
Creates a new generator for the distribution dist and stream s.

Method Detail

nextDouble

public 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.


SSJ
V. 1.2.5.

To submit a bug or ask questions, send an e-mail to Pierre L'Ecuyer.