public class Uniform extends ContinuousDistribution
Constructor and Description |
---|
Uniform(double a,
double b) |
Modifier and Type | Method and Description |
---|---|
double |
cdf(double x)
Computes the value of the Cumulative Density Function (CDF) at the given
point.
|
ContinuousDistribution |
clone() |
boolean |
equals(Object obj) |
double[] |
getCurrentVariableValues()
Returns an array, where each value contains the value of a parameter in the distribution.
|
String |
getDistributionName()
Return the name of the distribution.
|
String[] |
getVariables()
Returns an array, where each value contains the name of a parameter in the distribution.
|
int |
hashCode() |
double |
invCdf(double p)
Computes the inverse Cumulative Density Function (CDF-1) at
the given point.
|
double |
max()
The maximum value for which the
#pdf(double) is meant to return
a value. |
double |
mean()
Computes the mean value of the distribution
|
double |
median()
Computes the median value of the distribution
|
double |
min()
The minimum value for which the
#pdf(double) is meant to return
a value. |
double |
mode()
Computes the mode of the distribution.
|
double |
pdf(double x)
Computes the value of the Probability Density Function (PDF) at the given point
|
void |
setUsingData(Vec data)
Attempts to set the variables used by this distribution based on population sample data,
assuming the sample data is from this type of distribution.
|
void |
setVariable(String var,
double value)
Sets one of the variables of this distribution by the name.
|
double |
skewness()
Computes the skewness of the distribution.
|
double |
variance()
Computes the variance of the distribution.
|
getDescriptiveName, getFunctionPDF, getIntegrationMax, getIntegrationMin, logPdf, toString
getFunctionCDF, invCdf, sample, sampleVec, standardDeviation
public double pdf(double x)
ContinuousDistribution
pdf
in class ContinuousDistribution
x
- the value to get the PDFpublic double cdf(double x)
Distribution
cdf
in class ContinuousDistribution
x
- the value to get the CDF ofpublic double invCdf(double p)
Distribution
invCdf
in class ContinuousDistribution
p
- the probability valuepublic double min()
Distribution
#pdf(double)
is meant to return
a value. Note that Double.NEGATIVE_INFINITY
is a valid return
value.min
in class Distribution
#pdf(double)
is meant to
return a value.public double max()
Distribution
#pdf(double)
is meant to return
a value. Note that Double.POSITIVE_INFINITY
is a valid return
value.max
in class Distribution
#pdf(double)
is meant to
return a value.public String getDistributionName()
ContinuousDistribution
getDistributionName
in class ContinuousDistribution
public String[] getVariables()
ContinuousDistribution
ContinuousDistribution.getCurrentVariableValues()
getVariables
in class ContinuousDistribution
public double[] getCurrentVariableValues()
ContinuousDistribution
ContinuousDistribution.getVariables()
getCurrentVariableValues
in class ContinuousDistribution
ContinuousDistribution.getVariables()
public void setVariable(String var, double value)
ContinuousDistribution
setVariable
in class ContinuousDistribution
var
- the variable to setvalue
- the value to setpublic ContinuousDistribution clone()
clone
in class ContinuousDistribution
public void setUsingData(Vec data)
ContinuousDistribution
setUsingData
in class ContinuousDistribution
data
- the data to use to attempt to fit againstpublic double mean()
Distribution
mean
in class ContinuousDistribution
public double median()
Distribution
median
in class Distribution
public double mode()
Distribution
NaN
may be returned if the mode is not defined for the current values of the
distribution.mode
in class ContinuousDistribution
public double variance()
Distribution
NaN
may be
returned if the variance is not defined for the current values of the distribution.
Infinity
is a possible value to be returned
by some distributions.variance
in class ContinuousDistribution
public double skewness()
Distribution
NaN
may be
returned if the skewness is not defined for the current values of the distribution.skewness
in class ContinuousDistribution
Copyright © 2017. All rights reserved.