SSJ
V. labo.

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

HypoExponentialGen

This class implements random variate generators for the hypoexponential distribution (see classes umontreal.iro.lecuyer.probdistHypoExponentialDist and umontreal.iro.lecuyer.probdistHypoExponentialDistQuick in package probdist for the definition).


Constructor Summary
HypoExponentialGen(RandomStream stream, double[] lambda)
          .
HypoExponentialGen(RandomStream stream, HypoExponentialDist dist)
          .
 
Method Summary
 double[] getLambda()
          .
static double nextDouble(RandomStream stream, double[] lambda)
          .
 void setLambda(double[] lambda)
          .
 
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)
. \begin{tabb}Creates a hypoexponential random variate generator with
 rates $\lam...
 ...ttt{lambda[$i-1$]}, $i = 1,\ldots,k$,
 using stream \texttt{stream}.
 \end{tabb}


HypoExponentialGen

public HypoExponentialGen(RandomStream stream,
                          HypoExponentialDist dist)
. \begin{tabb}Creates a new generator for the hypoexponential
 distribution \texttt{dist} with stream \texttt{stream}.
 \end{tabb}

Method Detail

nextDouble

public static double nextDouble(RandomStream stream,
                                double[] lambda)
. \begin{tabb}Uses inversion to generate a new hypoexponential variate
 with rates...
 ...stream}. The inversion uses a root-finding method
 and is very slow.
 \end{tabb}


getLambda

public double[] getLambda()
. \begin{tabb}
 Returns the $\lambda_i$\ associated with this object.
 \end{tabb}


setLambda

public void setLambda(double[] lambda)
. \begin{tabb}Sets the rates $\lambda_i = $\ \texttt{lam[$i-1$]},
 $i = 1,\ldots,k$\ of this object.
 \end{tabb}


SSJ
V. labo.

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