SSJ
V. 2.6.

umontreal.iro.lecuyer.probdist
Class HypoExponentialDistEqual

java.lang.Object
  extended by umontreal.iro.lecuyer.probdist.ContinuousDistribution
      extended by umontreal.iro.lecuyer.probdist.HypoExponentialDist
          extended by umontreal.iro.lecuyer.probdist.HypoExponentialDistEqual
All Implemented Interfaces:
Distribution

public class HypoExponentialDistEqual
extends HypoExponentialDist

This class implements the hypoexponential distribution for the case of equidistant λi = (n + 1 - i)h. We have λi+1 - λi = h, with h a constant, and n >= k are integers.

The formula becomes

bar(F)(x) = P[X1 + ... + Xk > x] = ∑i=1ke-(n+1-i)hx1#1j=1j 2#2ikn+1-j/i-j.

The formula for the density becomes

f (x) = ∑i=1k(n + 1 - i)he-(n+1-i)hx[tex2html_wrap_indisplay193]j=1j [tex2html_wrap_indisplay194]ikn+1-j/i-j.


Field Summary
 
Fields inherited from class umontreal.iro.lecuyer.probdist.ContinuousDistribution
decPrec
 
Constructor Summary
HypoExponentialDistEqual(int n, int k, double h)
          Constructor for equidistant rates.
 
Method Summary
 double barF(double x)
          Returns the complementary distribution function.
static double barF(int n, int k, double h, double x)
          Computes the complementary distribution bar(F)(x), as in formula.
 double cdf(double x)
          Returns the distribution function F(x).
static double cdf(int n, int k, double h, double x)
          Computes the distribution function F(x), with arguments as in the constructor.
 double density(double x)
          Returns f (x), the density evaluated at x.
static double density(int n, int k, double h, double x)
          Computes the density function f (x), with the same arguments as in the constructor.
 double[] getParams()
          Returns the three parameters of this hypoexponential distribution as array (n, k, h).
 double inverseF(double u)
          Returns the inverse distribution function x = F-1(u).
static double inverseF(int n, int k, double h, double u)
          Computes the inverse distribution x = F-1(u), with arguments as in the constructor.
 void setParams(int n, int k, double h)
           
 String toString()
           
 
Methods inherited from class umontreal.iro.lecuyer.probdist.HypoExponentialDist
barF, cdf, cdf2, density, getLambda, getMean, getMean, getStandardDeviation, getStandardDeviation, getVariance, getVariance, inverseF, setLambda
 
Methods inherited from class umontreal.iro.lecuyer.probdist.ContinuousDistribution
getXinf, getXsup, inverseBisection, inverseBrent, setXinf, setXsup
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

HypoExponentialDistEqual

public HypoExponentialDistEqual(int n,
                                int k,
                                double h)
Constructor for equidistant rates. The rates are λi = (n + 1 - i)h, for i = 1,…, k.

Parameters:
n - largest rate is nh
k - number of rates
h - difference between adjacent rates
Method Detail

density

public double density(double x)
Description copied from class: ContinuousDistribution
Returns f (x), the density evaluated at x.

Overrides:
density in class HypoExponentialDist
Parameters:
x - value at which the density is evaluated
Returns:
density function evaluated at x

cdf

public double cdf(double x)
Description copied from interface: Distribution
Returns the distribution function F(x).

Specified by:
cdf in interface Distribution
Overrides:
cdf in class HypoExponentialDist
Parameters:
x - value at which the distribution function is evaluated
Returns:
distribution function evaluated at x

barF

public double barF(double x)
Description copied from class: ContinuousDistribution
Returns the complementary distribution function. The default implementation computes bar(F)(x) = 1 - F(x).

Specified by:
barF in interface Distribution
Overrides:
barF in class HypoExponentialDist
Parameters:
x - value at which the complementary distribution function is evaluated
Returns:
complementary distribution function evaluated at x

inverseF

public double inverseF(double u)
Description copied from class: ContinuousDistribution
Returns the inverse distribution function x = F-1(u). Restrictions: u∈[0, 1].

Specified by:
inverseF in interface Distribution
Overrides:
inverseF in class HypoExponentialDist
Parameters:
u - value at which the inverse distribution function is evaluated
Returns:
the inverse distribution function evaluated at u

density

public static double density(int n,
                             int k,
                             double h,
                             double x)
Computes the density function f (x), with the same arguments as in the constructor.

Parameters:
n - max possible number of λi
k - effective number of λi
h - step between two successive λi
x - value at which the distribution is evaluated
Returns:
density at x

cdf

public static double cdf(int n,
                         int k,
                         double h,
                         double x)
Computes the distribution function F(x), with arguments as in the constructor.

Parameters:
n - max possible number of λi
k - effective number of λi
h - step between two successive λi
x - value at which the distribution is evaluated
Returns:
value of distribution at x

barF

public static double barF(int n,
                          int k,
                          double h,
                          double x)
Computes the complementary distribution bar(F)(x), as in formula.

Parameters:
n - max possible number of λi
k - effective number of λi
h - step between two successive λi
x - value at which the complementary distribution is evaluated
Returns:
value of complementary distribution at x

inverseF

public static double inverseF(int n,
                              int k,
                              double h,
                              double u)
Computes the inverse distribution x = F-1(u), with arguments as in the constructor.

Parameters:
n - max possible number of λi
k - effective number of λi
h - step between two successive λi
u - value at which the inverse distribution is evaluated
Returns:
inverse distribution at u

getParams

public double[] getParams()
Returns the three parameters of this hypoexponential distribution as array (n, k, h).

Specified by:
getParams in interface Distribution
Overrides:
getParams in class HypoExponentialDist
Returns:
parameters of the hypoexponential distribution

setParams

public void setParams(int n,
                      int k,
                      double h)

toString

public String toString()
Overrides:
toString in class HypoExponentialDist

SSJ
V. 2.6.

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