|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object de.lmu.ifi.dbs.elki.data.synthetic.bymodel.distribution.GammaDistribution
public final class GammaDistribution
Simple generator for a Gamma Distribution
Field Summary | |
---|---|
private double |
k
Alpha == k |
private Random |
random
The random generator. |
private double |
theta
Theta == 1 / Beta |
Constructor Summary | |
---|---|
GammaDistribution(double k,
double theta,
Random random)
Constructor for Gamma distribution generator |
Method Summary | |
---|---|
double |
explain(double val)
Return the PDF of the generators distribution |
double |
generate()
Generate a random value with the generators parameters. |
double |
getK()
|
double |
getTheta()
|
static double |
pdf(double x,
double k,
double theta)
Gamma distribution PDF (with 0.0 for x < 0) |
String |
toString()
Simple toString explaining the distribution parameters. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
private final double k
private final double theta
private Random random
Constructor Detail |
---|
public GammaDistribution(double k, double theta, Random random)
k
- k, alpha aka. "shape" parametertheta
- Theta = 1.0/Beta aka. "scaling" parameterrandom
- Random generatorMethod Detail |
---|
public static double pdf(double x, double k, double theta)
x
- query valuek
- Alphatheta
- Thetha = 1 / Beta
public double explain(double val)
explain
in interface Distribution
val
- existing value
public double generate()
generate
in interface Distribution
public String toString()
toString
in interface Distribution
toString
in class Object
public double getK()
public double getTheta()
|
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |