|
|
|||||||||||||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||||||||||||||
java.lang.Objectde.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 generator| Method Detail |
|---|
public double explain(double val)
explain in interface Distributionval - existing value
public double generate()
generate in interface Distributionpublic String toString()
toString in interface DistributiontoString in class Objectpublic double getMin()
public double getMax()
|
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||||