|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object edu.uah.math.distributions.Distribution edu.uah.math.distributions.GammaDistribution edu.uah.math.distributions.ExponentialDistribution
public class ExponentialDistribution
This class defines the standard exponential distribution with a specified rate parameter.
Field Summary |
---|
Fields inherited from class edu.uah.math.distributions.Distribution |
---|
CONTINUOUS, DISCRETE, MIXED |
Constructor Summary | |
---|---|
ExponentialDistribution()
This default constructor creates a new exponential distribution with rate 1. |
|
ExponentialDistribution(double r)
This general constructor creates a new exponential distribution with a specified rate. |
Method Summary | |
---|---|
double |
getCDF(double x)
This method defines the cumulative distribution function. |
double |
getDensity(double x)
This method computes the probability denstiy function. |
double |
getMoment(int n)
This method computes the moment of order n. |
double |
getQuantile(double p)
The method computes the quantile function. |
double |
getRate()
This method gets the rate. |
void |
setParameters(double k,
double b)
This method sets the gamma shape and scale parameters. |
void |
setRate(double r)
This method sets the rate parameter. |
void |
setShape(double k)
This method sets the gamma shape parameter, which must be 1. |
java.lang.String |
toString()
This method returns a string that gives the name of the distribution and the values of the parameters. |
Methods inherited from class edu.uah.math.distributions.GammaDistribution |
---|
getMaxDensity, getMean, getMGF, getMoment, getScale, getShape, getVariance, setScale, simulate |
Methods inherited from class edu.uah.math.distributions.Distribution |
---|
getDomain, getFailureRate, getMedian, getPGF, getSD, getType, setDomain, setDomain |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public ExponentialDistribution(double r)
r
- the ratepublic ExponentialDistribution()
Method Detail |
---|
public void setRate(double r)
r
- the ratepublic double getRate()
public double getDensity(double x)
getDensity
in class GammaDistribution
x
- a number in the domain of the distribution
public double getCDF(double x)
getCDF
in class GammaDistribution
x
- a number in the domain of the distribution
public double getQuantile(double p)
getQuantile
in class Distribution
p
- a probability in (0, 1)
public double getMoment(int n)
getMoment
in class GammaDistribution
n
- the order
public void setShape(double k)
setShape
in class GammaDistribution
k
- the shape parameterpublic void setParameters(double k, double b)
setParameters
in class GammaDistribution
k
- the shape parameterb
- the scale parameterpublic java.lang.String toString()
toString
in class GammaDistribution
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |