|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.mahout.math.function.DoubleFunction
org.apache.mahout.math.jet.random.AbstractDistribution
org.apache.mahout.math.jet.random.AbstractContinousDistribution
org.apache.mahout.math.jet.random.Gamma
public class Gamma
Constructor Summary | |
---|---|
Gamma(double alpha,
double rate,
Random randomGenerator)
Constructs a Gamma distribution with a given shape (alpha) and rate (beta). |
Method Summary | |
---|---|
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()
|
Methods inherited from class org.apache.mahout.math.jet.random.AbstractContinousDistribution |
---|
nextInt |
Methods inherited from class org.apache.mahout.math.jet.random.AbstractDistribution |
---|
apply, apply, getRandomGenerator, randomDouble, setRandomGenerator |
Methods inherited from class org.apache.mahout.math.function.DoubleFunction |
---|
isDensifying |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public 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.Method Detail |
---|
public double cdf(double x)
cdf
in class AbstractContinousDistribution
x
- The end-point where the cumulation should end.public double nextDouble()
nextDouble
in class AbstractDistribution
public double nextDouble(double alpha, double rate)
alpha
- Shape parameter.rate
- Rate parameter (=1/scale).
public double pdf(double x)
pdf
in class AbstractContinousDistribution
x
- Where to compute the density function.
public String toString()
toString
in class Object
public static double logGamma(double x)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |