|
||||||||||
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
public class GammaDistribution
This class models the gamma distribution with a specified shape parameter and scale parameter. This distribution governs the time of an event in the Poisson process.
Field Summary |
---|
Fields inherited from class edu.uah.math.distributions.Distribution |
---|
CONTINUOUS, DISCRETE, MIXED |
Constructor Summary | |
---|---|
GammaDistribution()
This default constructor creates a new gamma distribution with shape parameter 1 and scale parameter 1. |
|
GammaDistribution(double k,
double b)
This general constructor creates a new gamma distribution with specified shape parameter and scale parameters. |
Method Summary | |
---|---|
double |
getCDF(double x)
This method computes the cumulative distribution function of the distribution. |
double |
getDensity(double x)
This method computes the probability density function, |
double |
getMaxDensity()
This method returns the maximum value of the density function. |
double |
getMean()
This method returns the mean bk. |
double |
getMGF(double t)
This method returns the moment generating function. |
double |
getMoment(double a,
int n)
This method returns the moment a specified order about a specified point. |
double |
getMoment(int n)
This method returns the moment of order n. |
double |
getScale()
This method returns the scale parameter. |
double |
getShape()
This method returns the shape parameter. |
double |
getVariance()
This method returns the variance kb2. |
void |
setParameters(double k,
double b)
This method sets the parameters and creates the default domain. |
void |
setScale(double b)
This method sets the scale parameters. |
void |
setShape(double k)
This method sets the shape parameter. |
double |
simulate()
This method simulates a value from the distribution. |
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.Distribution |
---|
getDomain, getFailureRate, getMedian, getPGF, getQuantile, getSD, getType, setDomain, setDomain |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public GammaDistribution(double k, double b)
k
- the shape parameterb
- the scale parameterpublic GammaDistribution()
Method Detail |
---|
public void setParameters(double k, double b)
k
- the shape parameterb
- the scale parameterpublic void setShape(double k)
k
- the shape parameterpublic double getShape()
public void setScale(double b)
b
- the scale parameterpublic double getScale()
public double getDensity(double x)
getDensity
in class Distribution
x
- a number > 0
public double getMaxDensity()
getMaxDensity
in class Distribution
public double getMean()
getMean
in class Distribution
public double getVariance()
getVariance
in class Distribution
public double getMoment(int n)
getMoment
in class Distribution
n
- the order
public double getMoment(double a, int n)
getMoment
in class Distribution
a
- the centern
- the order
public double getMGF(double t)
getMGF
in class Distribution
t
- a number in the domain of the MGF
public double getCDF(double x)
getCDF
in class Distribution
x
- a number in the domain of the distribution
public double simulate()
simulate
in class Distribution
public java.lang.String toString()
toString
in class Distribution
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |