|
SSJ V. 2.6. |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object umontreal.iro.lecuyer.probdist.ContinuousDistribution umontreal.iro.lecuyer.probdist.TruncatedDist
public class TruncatedDist
This container class takes an arbitrary continuous distribution and truncates it to an interval [a, b], where a and b can be finite or infinite. If the original density and distribution function are f0 and F0, the new ones are f and F, defined by
Field Summary | |
---|---|
static int |
NUMINTERVALS
|
Fields inherited from class umontreal.iro.lecuyer.probdist.ContinuousDistribution |
---|
decPrec |
Constructor Summary | |
---|---|
TruncatedDist(ContinuousDistribution dist,
double a,
double b)
Constructs a new distribution by truncating distribution dist to the interval [a, b]. |
Method Summary | |
---|---|
double |
barF(double x)
Returns the complementary distribution function. |
double |
cdf(double x)
Returns the distribution function F(x). |
double |
density(double x)
Returns f (x), the density evaluated at x. |
double |
getA()
Returns the value of a. |
double |
getArea()
Returns the value of F0(b) - F0(a), the area under the truncated density function. |
double |
getB()
Returns the value of b. |
double |
getFa()
Returns the value of F0(a). |
double |
getFb()
Returns the value of F0(b). |
double |
getMean()
Returns an approximation of the mean computed with the Simpson 1/3 numerical integration rule. |
double[] |
getParams()
Return a table containing the parameters of the current distribution. |
double |
getStandardDeviation()
Returns the square root of the approximate variance. |
double |
getVariance()
Returns an approximation of the variance computed with the Simpson 1/3 numerical integration rule. |
double |
inverseF(double u)
Returns the inverse distribution function x = F-1(u). |
void |
setParams(ContinuousDistribution dist,
double a,
double b)
Sets the parameters dist, a and b for this object. |
String |
toString()
Returns a String containing information about the current distribution. |
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 |
Field Detail |
---|
public static int NUMINTERVALS
Constructor Detail |
---|
public TruncatedDist(ContinuousDistribution dist, double a, double b)
Method Detail |
---|
public double density(double x)
ContinuousDistribution
density
in class ContinuousDistribution
x
- value at which the density is evaluated
public double cdf(double x)
Distribution
x
- value at which the distribution function is evaluated
public double barF(double x)
ContinuousDistribution
barF
in interface Distribution
barF
in class ContinuousDistribution
x
- value at which the complementary distribution function is evaluated
public double inverseF(double u)
ContinuousDistribution
inverseF
in interface Distribution
inverseF
in class ContinuousDistribution
u
- value at which the inverse distribution function is evaluated
public double getMean()
getMean
in interface Distribution
getMean
in class ContinuousDistribution
UnsupportedOperationException
- the mean of the truncated distribution is unknownpublic double getVariance()
getVariance
in interface Distribution
getVariance
in class ContinuousDistribution
UnsupportedOperationException
- the mean of the truncated distribution is unknownpublic double getStandardDeviation()
getStandardDeviation
in interface Distribution
getStandardDeviation
in class ContinuousDistribution
UnsupportedOperationException
- the mean of the truncated distribution is unknownpublic double getA()
public double getB()
public double getFa()
public double getFb()
public double getArea()
public void setParams(ContinuousDistribution dist, double a, double b)
public double[] getParams()
public String toString()
toString
in class Object
|
SSJ V. 2.6. |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |