|
SSJ V. 2.6. |
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectumontreal.iro.lecuyer.probdist.ContinuousDistribution
public abstract class ContinuousDistribution
Classes implementing continuous distributions should inherit from this base class. Such distributions are characterized by a density function f (x), thus the signature of a density method is supplied here. This class also provides default implementations for bar(F)(x) and for F-1(u), the latter using the Brent-Dekker method to find the inverse of a generic distribution function F.
| Field Summary | |
|---|---|
int |
decPrec
Deprecated. |
| Constructor Summary | |
|---|---|
ContinuousDistribution()
|
|
| Method Summary | |
|---|---|
double |
barF(double x)
Returns the complementary distribution function. |
abstract double |
density(double x)
Returns f (x), the density evaluated at x. |
double |
getMean()
Returns the mean. |
double |
getStandardDeviation()
Returns the standard deviation. |
double |
getVariance()
Returns the variance. |
double |
getXinf()
Returns xa such that the probability density is 0 everywhere outside the interval [xa, xb]. |
double |
getXsup()
Returns xb such that the probability density is 0 everywhere outside the interval [xa, xb]. |
double |
inverseBisection(double u)
Computes and returns the inverse distribution function x = F-1(u), using bisection. |
double |
inverseBrent(double a,
double b,
double u,
double tol)
Computes the inverse distribution function x = F-1(u), using the Brent-Dekker method. |
double |
inverseF(double u)
Returns the inverse distribution function x = F-1(u). |
void |
setXinf(double xa)
Sets the value xa = xa, such that the probability density is 0 everywhere outside the interval [xa, xb]. |
void |
setXsup(double xb)
Sets the value xb = xb, such that the probability density is 0 everywhere outside the interval [xa, xb]. |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface umontreal.iro.lecuyer.probdist.Distribution |
|---|
cdf, getParams |
| Field Detail |
|---|
@Deprecated public int decPrec
| Constructor Detail |
|---|
public ContinuousDistribution()
| Method Detail |
|---|
public abstract double density(double x)
x - value at which the density is evaluated
public double barF(double x)
barF in interface Distributionx - value at which the complementary distribution function is evaluated
public double inverseBrent(double a,
double b,
double u,
double tol)
a - left endpoint of initial intervalb - right endpoint of initial intervalu - value at which the inverse distribution function is evaluatedtol - accuracy goal
public double inverseBisection(double u)
u - value at which the inverse distribution function is evaluated
IllegalArgumentException - if u is not in the interval [0, 1]public double inverseF(double u)
inverseF in interface Distributionu - value at which the inverse distribution function is evaluated
IllegalArgumentException - if u is not in the interval [0, 1]public double getMean()
getMean in interface Distributionpublic double getVariance()
getVariance in interface Distributionpublic double getStandardDeviation()
getStandardDeviation in interface Distributionpublic double getXinf()
public double getXsup()
public void setXinf(double xa)
xa - lower limit of supportpublic void setXsup(double xb)
xb - upper limit of support
|
SSJ V. 2.6. |
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||