@Alias(value="de.lmu.ifi.dbs.elki.data.synthetic.bymodel.distribution.UniformDistribution") 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,
java.util.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 |
logpdf(double val)
Return the log density of an existing value
|
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.
|
java.lang.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, java.util.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 logpdf(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 java.lang.String toString()
Distribution
toString
in interface Distribution
toString
in class java.lang.Object
public double getMin()
public double getMax()
Copyright © 2019 ELKI Development Team. License information.