|
||||||||||
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.NormalDistribution
public final class NormalDistribution
Simple generator for a Gaussian = Normal Distribution
Field Summary | |
---|---|
private double |
mean
Mean value for the generator |
private Random |
random
The random generator. |
private double |
stddev
Standard deviation |
Constructor Summary | |
---|---|
NormalDistribution(double mean,
double stddev,
Random random)
Constructor for Gaussian 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 |
getMean()
|
double |
getStddev()
|
private static double |
phi(double x)
Standardized Gaussian PDF |
static double |
phi(double x,
double mu,
double sigma)
Gaussian distribution PDF |
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 double mean
private double stddev
private Random random
Constructor Detail |
---|
public NormalDistribution(double mean, double stddev, Random random)
mean
- Meanstddev
- Standard Deviationrandom
- Random generatorMethod Detail |
---|
private static double phi(double x)
x
- query value
public static double phi(double x, double mu, double sigma)
x
- query valuemu
- meansigma
- standard distribution
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 getMean()
public double getStddev()
|
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |