Class UniformDistribution
- java.lang.Object
-
- elki.math.statistics.distribution.UniformDistribution
-
- All Implemented Interfaces:
Distribution
public class UniformDistribution extends java.lang.Object implements Distribution
Uniform distribution.- Since:
- 0.2
- Author:
- Erich Schubert
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
UniformDistribution.Par
Parameterization class-
Nested classes/interfaces inherited from interface elki.math.statistics.distribution.Distribution
Distribution.Parameterizer
-
-
Constructor Summary
Constructors Constructor Description UniformDistribution(double min, double max)
Constructor for a uniform distribution on the interval [min, max[
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method 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 valuedouble
nextRandom(java.util.Random random)
Generate a new random valuedouble
pdf(double val)
Return the density of an existing valuedouble
quantile(double val)
Quantile aka probit (for normal) aka inverse CDF (invcdf, cdf^-1) function.java.lang.String
toString()
Describe the distribution
-
-
-
Method Detail
-
pdf
public double pdf(double val)
Description copied from interface:Distribution
Return the density of an existing value- Specified by:
pdf
in interfaceDistribution
- Parameters:
val
- existing value- Returns:
- distribution density
-
logpdf
public double logpdf(double val)
Description copied from interface:Distribution
Return the log density of an existing value- Specified by:
logpdf
in interfaceDistribution
- Parameters:
val
- existing value- Returns:
- log distribution density
-
cdf
public double cdf(double val)
Description copied from interface:Distribution
Return the cumulative density function at the given value.- Specified by:
cdf
in interfaceDistribution
- Parameters:
val
- existing value- Returns:
- cumulative density
-
quantile
public double quantile(double val)
Description copied from interface:Distribution
Quantile aka probit (for normal) aka inverse CDF (invcdf, cdf^-1) function.- Specified by:
quantile
in interfaceDistribution
- Parameters:
val
- Quantile to find- Returns:
- Quantile position
-
nextRandom
public double nextRandom(java.util.Random random)
Description copied from interface:Distribution
Generate a new random value- Specified by:
nextRandom
in interfaceDistribution
- Parameters:
random
- Random number generator- Returns:
- new random value
-
toString
public java.lang.String toString()
Description copied from interface:Distribution
Describe the distribution- Specified by:
toString
in interfaceDistribution
- Overrides:
toString
in classjava.lang.Object
- Returns:
- description
-
getMin
public double getMin()
- Returns:
- the minimum value
-
getMax
public double getMax()
- Returns:
- the maximum value
-
-