|
||||||||||
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.UniformDistribution
public final class UniformDistribution
Simple uniform distribution class
Field Summary | |
---|---|
private double |
len
Len := max - min |
private double |
max
Maximum |
private double |
min
Minimum |
private Random |
random
The random generator. |
Constructor Summary | |
---|---|
UniformDistribution(double min,
double max,
Random random)
Constructor for a uniform distribution on the interval [min, max[ |
Method Summary | |
---|---|
double |
explain(double val)
Return the PDF of the generators distribution |
double |
generate()
Generate a random value with the generators parameters |
double |
getMax()
|
double |
getMin()
|
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 min
private double max
private double len
private Random random
Constructor Detail |
---|
public UniformDistribution(double min, double max, Random random)
min
- Minimum valuemax
- Maximum valuerandom
- Random generatorMethod Detail |
---|
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 getMin()
public double getMax()
|
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |