public class GammaDistribution extends Object implements ProbabilityDistribution<Double>
| Constructor and Description |
|---|
GammaDistribution(double k,
double theta) |
GammaDistribution(double k,
double theta,
RandomEngine engine) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(Object obj) |
double |
getCDF(Double x)
Returns the cumulative distribution function for a value
|
double |
getInverseCDF(Double p)
Given a probability, return the value that returns this cdf
|
double |
getK() |
double |
getPDF(Double x)
Return the probability density function for a value
|
double |
getTheta() |
int |
hashCode() |
double |
nextRandom() |
public GammaDistribution(double k,
double theta)
k - The shape parameter of the distribution, not negative or zerotheta - The scale parameter of the distribution, not negative or zeropublic GammaDistribution(double k,
double theta,
RandomEngine engine)
k - The shape parameter of the distribution, not negative or zerotheta - The scale parameter of the distribution, not negative or zeroengine - A uniform random number generator, not nullpublic double getCDF(Double x)
getCDF in interface ProbabilityDistribution<Double>x - The value, not nullpublic double getInverseCDF(Double p)
getInverseCDF in interface ProbabilityDistribution<Double>p - The probability, not null. $0 \geq p \geq 1$UnsupportedOperationException - alwayspublic double getPDF(Double x)
getPDF in interface ProbabilityDistribution<Double>x - The value, not nullpublic double nextRandom()
nextRandom in interface ProbabilityDistribution<Double>public double getK()
public double getTheta()
Copyright 2009-Present by OpenGamma Inc. and individual contributors
Apache v2 licensed
Additional documentation can be found at strata.opengamma.io.