public class UniformDistribution extends AbstractDistribution
Modifier and Type | Class and Description |
---|---|
static class |
UniformDistribution.Parameterizer
Parameterization class
|
Modifier and Type | Field and Description |
---|---|
private double |
len
Len := max - min
|
private double |
max
Maximum
|
private double |
min
Minimum
|
random
Constructor and Description |
---|
UniformDistribution(double min,
double max)
Constructor for a uniform distribution on the interval [min, max[
|
UniformDistribution(double min,
double max,
Random random)
Constructor for a uniform distribution on the interval [min, max[
|
UniformDistribution(double min,
double max,
RandomFactory random)
Constructor for a uniform distribution on the interval [min, max[
|
Modifier and Type | Method and Description |
---|---|
double |
cdf(double val)
Return the cumulative density function at the given value.
|
double |
getMax() |
double |
getMin() |
double |
nextRandom()
Generate a new random value
|
double |
pdf(double val)
Return the density of an existing value
|
double |
quantile(double val)
Quantile aka probit (for normal) aka inverse CDF (invcdf, cdf^-1) function.
|
String |
toString()
Describe the distribution
|
private double min
private double max
private double len
public UniformDistribution(double min, double max, RandomFactory random)
min
- Minimum valuemax
- Maximum valuerandom
- Random generatorpublic UniformDistribution(double min, double max, Random random)
min
- Minimum valuemax
- Maximum valuerandom
- Random generatorpublic UniformDistribution(double min, double max)
min
- Minimum valuemax
- Maximum valuepublic double pdf(double val)
Distribution
val
- existing valuepublic double cdf(double val)
Distribution
val
- existing valuepublic double quantile(double val)
Distribution
val
- Quantile to findpublic double nextRandom()
Distribution
nextRandom
in interface Distribution
nextRandom
in class AbstractDistribution
public String toString()
Distribution
toString
in interface Distribution
toString
in class Object
public double getMin()
public double getMax()
Copyright © 2015 ELKI Development Team, Lehr- und Forschungseinheit für Datenbanksysteme, Ludwig-Maximilians-Universität München. License information.