public class Gamma extends AbstractContinousDistribution
| Constructor and Description |
|---|
Gamma(double alpha,
double rate,
Random randomGenerator)
Constructs a Gamma distribution with a given shape (alpha) and rate (beta).
|
| Modifier and Type | Method and Description |
|---|---|
double |
cdf(double x)
Returns the cumulative distribution function.
|
static double |
logGamma(double x)
Returns a quick approximation of log(gamma(x)).
|
double |
nextDouble()
Returns a random number from the distribution.
|
double |
nextDouble(double alpha,
double rate)
Returns a random number from the distribution; bypasses the internal state.
|
double |
pdf(double x)
Returns the probability distribution function.
|
String |
toString() |
nextIntapply, apply, getRandomGenerator, randomDouble, setRandomGeneratorisDensifyingpublic Gamma(double alpha,
double rate,
Random randomGenerator)
alpha - The shape parameter.rate - The rate parameter.randomGenerator - The random number generator that generates bits for us.IllegalArgumentException - if alpha <= 0.0 || alpha <= 0.0.public double cdf(double x)
cdf in class AbstractContinousDistributionx - The end-point where the cumulation should end.public double nextDouble()
nextDouble in class AbstractDistributionpublic double nextDouble(double alpha,
double rate)
alpha - Shape parameter.rate - Rate parameter (=1/scale).public double pdf(double x)
pdf in class AbstractContinousDistributionx - Where to compute the density function.public static double logGamma(double x)
Copyright © 2008–2015 The Apache Software Foundation. All rights reserved.