SSJ
V. 2.6.

umontreal.iro.lecuyer.randvar
Class HypoExponentialGen

java.lang.Object
  extended by umontreal.iro.lecuyer.randvar.RandomVariateGen
      extended by umontreal.iro.lecuyer.randvar.HypoExponentialGen

public class HypoExponentialGen
extends RandomVariateGen

This class implements random variate generators for the hypoexponential distribution (see classes HypoExponentialDist and HypoExponentialDistQuick in package probdist for the definition).


Constructor Summary
HypoExponentialGen(RandomStream stream, double[] lambda)
          Creates a hypoexponential random variate generator with rates λi = lambda[i - 1], i = 1,…, k, using stream stream.
HypoExponentialGen(RandomStream stream, HypoExponentialDist dist)
          Creates a new generator for the hypoexponential distribution dist with stream stream.
 
Method Summary
 double[] getLambda()
          Returns the λi associated with this object.
static double nextDouble(RandomStream stream, double[] lambda)
          Uses inversion to generate a new hypoexponential variate with rates λi = lambda[i - 1], i = 1,…, k, using stream stream.
 void setLambda(double[] lambda)
          Sets the rates λi = lam[i - 1], i = 1,…, k of this object.
 
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

HypoExponentialGen

public HypoExponentialGen(RandomStream stream,
                          double[] lambda)
Creates a hypoexponential random variate generator with rates λi = lambda[i - 1], i = 1,…, k, using stream stream.


HypoExponentialGen

public HypoExponentialGen(RandomStream stream,
                          HypoExponentialDist dist)
Creates a new generator for the hypoexponential distribution dist with stream stream.

Method Detail

nextDouble

public static double nextDouble(RandomStream stream,
                                double[] lambda)
Uses inversion to generate a new hypoexponential variate with rates λi = lambda[i - 1], i = 1,…, k, using stream stream. The inversion uses a root-finding method and is very slow.


getLambda

public double[] getLambda()
Returns the λi associated with this object.


setLambda

public void setLambda(double[] lambda)
Sets the rates λi = lam[i - 1], i = 1,…, k of this object.


SSJ
V. 2.6.

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