package umontreal.iro.lecuyer.probdist;
/**
* This interface should be implemented by all classes supporting
* discrete and continuous distributions. It specifies the signature of methods that compute
* the distribution function F(x),
* the complementary distribution function bar(F)(x),
* and the inverse distribution function
* F-1(u).
* It also specifies the signature of methods that returns the mean,
* the variance and the standard deviation.
*
*/
public interface Distribution {
/**
* Returns the distribution function F(x).
*
* @param x value at which the distribution function is evaluated
*
* @return distribution function evaluated at x
*
*/
public double cdf (double x);
/**
* Returns
* bar(F)(x) = 1 - F(x).
*
* @param x value at which the complementary distribution function is evaluated
*
* @return complementary distribution function evaluated at x
*
*/
public double barF (double x);
/**
* Returns the inverse distribution function
* F-1(u), defined in.
*
* @param u value in the interval (0, 1) for which the inverse
* distribution function is evaluated
*
* @return the inverse distribution function evaluated at u
*
*/
public double inverseF (double u);
/**
* Returns the mean of the distribution function.
*
*/
public double getMean();
/**
* Returns the variance of the distribution function.
*
*/
public double getVariance();
/**
* Returns the standard deviation of the distribution function.
*
*/
public double getStandardDeviation();
/**
* Returns the parameters of the distribution function in the same
* order as in the constructors.
*
*/
public double[] getParams();
}
Ads help maintain this website.