|
SSJ V. 1.2.5. |
||||||||
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 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 of bar(F)(x) and of F-1(u), the latter using binary search to find the inverse of a generic distribution function F. The integer decPrec defines the target number of decimals of precision when approximating a distribution function, but there is no guarantee that this target is always attained.
Field Summary | |
---|---|
int |
decPrec
|
Constructor Summary | |
---|---|
ContinuousDistribution()
|
Method Summary | |
---|---|
double |
barF(double x)
Returns bar(F)(x) = 1 - F(x). |
abstract double |
density(double x)
Returns f (x), the density of X evaluated at x. |
double |
inverseBisection(double u)
|
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)
Computes and returns the inverse distribution function F-1(u), defined in. |
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, getMean, getStandardDeviation, getVariance |
Field Detail |
---|
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 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 barF(double x)
Distribution
barF
in interface Distribution
x
- value at which the complementary distribution function is evaluated
public double inverseF(double u)
Distribution
inverseF
in interface Distribution
u
- value in the interval (0, 1) for which the inverse
distribution function is evaluated
public double inverseBisection(double u)
|
SSJ V. 1.2.5. |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |