|
SSJ V. labo. |
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectumontreal.iro.lecuyer.probdist.ContinuousDistribution
umontreal.iro.lecuyer.probdist.HypoExponentialDist
umontreal.iro.lecuyer.probdist.HypoExponentialDistQuick
public class HypoExponentialDistQuick
HypoExponentialDistQuick
This class is a subclass of HypoExponentialDist and also implements the hypoexponential distribution. It uses different algorithms to compute the probabilities. The formula for the complementary distribution is mathematically equivalent to (see[#!pROS07b!#, page 299] and[#!pGER10a!#, Appendix B])
(x) = P[X1 + ... + Xk > x] =
e-λix
λj/(λj-λi).
The expression is much faster to compute than the
matrix exponential formula, but it becomes numerically
unstable when k gets large and/or the differences between the λi
are too small, because it is an alternating sum with relatively large terms
of similar size. When the λi are close, many of the
factors
λj - λi in are small,
and the effect of this is amplified when k is large. This gives rise to
large terms of opposite sign in the sum and the formula becomes unstable
due to subtractive cancellation.
For example, with the computations done in standard 64-bit floating-point
arithmetic, if the λi are regularly spaced with differences
of
λi+1 - λi = 0.1 for all i, the formula breaks down already for
k
15, while if
the differences
λi+1 - λi = 3, it gives a few decimal
digits of precision for k up to
[tex2html_wrap_inline208] 300.
The formula for the density is mathematically equivalent to the much faster formula
| Field Summary |
|---|
| Fields inherited from class umontreal.iro.lecuyer.probdist.ContinuousDistribution |
|---|
decPrec |
| Constructor Summary | |
|---|---|
HypoExponentialDistQuick(double[] lambda)
. |
|
| Method Summary | |
|---|---|
double |
barF(double x)
Returns the complementary distribution function. |
static double |
barF(double[] lambda,
double x)
. |
double |
cdf(double x)
. |
static double |
cdf(double[] lambda,
double x)
. |
double |
density(double x)
Returns f (x), the density evaluated at x. |
static double |
density(double[] lambda,
double x)
. |
double |
inverseF(double u)
Returns the inverse distribution function x = F-1(u). |
static double |
inverseF(double[] lambda,
double u)
. |
void |
setLambda(double[] lambda)
Sets the values λi =lambda[i - 1], i = 1,…, k for this object. |
String |
toString()
|
| Methods inherited from class umontreal.iro.lecuyer.probdist.HypoExponentialDist |
|---|
cdf2, getLambda, getMean, getMean, getParams, getStandardDeviation, getStandardDeviation, getVariance, getVariance |
| 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 |
|---|
public HypoExponentialDistQuick(double[] lambda)
| Method Detail |
|---|
public double density(double x)
ContinuousDistribution
density in class HypoExponentialDistx - value at which the density is evaluated
public double cdf(double x)
Distribution
cdf in interface Distributioncdf in class HypoExponentialDistpublic double barF(double x)
ContinuousDistribution
barF in interface DistributionbarF in class HypoExponentialDistx - value at which the complementary distribution function is evaluated
public double inverseF(double u)
ContinuousDistribution
inverseF in interface DistributioninverseF in class HypoExponentialDistu - value at which the inverse distribution function is evaluated
public static double density(double[] lambda,
double x)
public static double cdf(double[] lambda,
double x)
public static double barF(double[] lambda,
double x)
public static double inverseF(double[] lambda,
double u)
public void setLambda(double[] lambda)
HypoExponentialDist
setLambda in class HypoExponentialDistpublic String toString()
toString in class HypoExponentialDist
|
SSJ V. labo. |
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||