Package jline.lang.processes
Class Uniform
java.lang.Object
jline.lang.processes.Distribution
jline.lang.processes.ContinuousDistribution
jline.lang.processes.Uniform
- All Implemented Interfaces:
Serializable,Copyable
A continuous Uniform distribution
- See Also:
-
Field Summary
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiondoubleevalCDF(double t) Evaluates the cumulative distribution function (CDF) at the given point.doubleevalLST(double s) Evaluate the Laplace-Stieltjes Transform at sorg.apache.commons.math3.complex.ComplexevalLST(org.apache.commons.math3.complex.Complex s) The transform at a COMPLEX argument, exact and analytic, where the CDF sum ofDistribution.evalLST(org.apache.commons.math3.complex.Complex)would only approximate it.doubleevalPDF(double t) Evaluates the probability density function (PDF) at the given point.doublegetMean()Gets the mean (expected value) of this distribution.Gets the process representation with actual distribution parameters.doublegetRate()Gets the rate of this distribution (inverse of mean).doublegetSCV()Gets the squared coefficient of variation (SCV) of this distribution.doubleGets the skewness of this distribution.doublegetVar()Gets the variance of this distribution.doublemean()Property alias for getMeanprocess()Property alias for getProcessdoublerate()Property alias for getRatedouble[]sample(int n) Gets n samples from the distributiondouble[]Generates random samples from this distribution using the specified random generator.doublescv()Property alias for getSCVdoubleskewness()Property alias for getSkewnessdoublevar()Property alias for getVarMethods inherited from class jline.lang.processes.Distribution
evalProbInterval, getFeatureName, getName, getNumParams, getNumParams, getParam, getParam, getParams, getSupport, hasParam, isContinuous, isDisabled, isDiscrete, isImmediate, isMarkovian, name, numParams, param, setNumParams, setParam, support
-
Constructor Details
-
Uniform
public Uniform(double minVal, double maxVal)
-
-
Method Details
-
evalCDF
public double evalCDF(double t) Description copied from class:DistributionEvaluates the cumulative distribution function (CDF) at the given point.- Specified by:
evalCDFin classDistribution- Parameters:
t- the point at which to evaluate the CDF- Returns:
- the CDF value at point t
-
evalPDF
public double evalPDF(double t) Evaluates the probability density function (PDF) at the given point. Uniform PDF: 1/(max-min) for min <= x <= max, 0 otherwise- Parameters:
t- the point at which to evaluate the PDF- Returns:
- the PDF value at point t
-
evalLST
public double evalLST(double s) Description copied from class:DistributionEvaluate the Laplace-Stieltjes Transform at s- Specified by:
evalLSTin classContinuousDistribution- Parameters:
s- the Laplace domain variable- Returns:
- the LST value at s
-
evalLST
public org.apache.commons.math3.complex.Complex evalLST(org.apache.commons.math3.complex.Complex s) The transform at a COMPLEX argument, exact and analytic, where the CDF sum ofDistribution.evalLST(org.apache.commons.math3.complex.Complex)would only approximate it.- Overrides:
evalLSTin classDistribution- Parameters:
s- the Laplace domain variable- Returns:
- the LST value at s
-
getMean
public double getMean()Description copied from class:DistributionGets the mean (expected value) of this distribution.- Specified by:
getMeanin classDistribution- Returns:
- the mean value
-
getRate
public double getRate()Description copied from class:DistributionGets the rate of this distribution (inverse of mean).- Overrides:
getRatein classDistribution- Returns:
- the rate value (1/mean)
-
getSCV
public double getSCV()Description copied from class:DistributionGets the squared coefficient of variation (SCV) of this distribution. SCV = Var(X) / E[X]^2.- Specified by:
getSCVin classDistribution- Returns:
- the squared coefficient of variation
-
getSkewness
public double getSkewness()Description copied from class:DistributionGets the skewness of this distribution. Skewness measures the asymmetry of the probability distribution.- Specified by:
getSkewnessin classDistribution- Returns:
- the skewness value
-
getVar
public double getVar()Description copied from class:DistributionGets the variance of this distribution. Computed as SCV * mean^2.- Overrides:
getVarin classDistribution- Returns:
- the variance
-
sample
Description copied from class:DistributionGenerates random samples from this distribution using the specified random generator.- Specified by:
samplein classDistribution- Parameters:
n- the number of samples to generaterandom- the random number generator to use- Returns:
- array of random samples
-
sample
public double[] sample(int n) Gets n samples from the distribution- Overrides:
samplein classDistribution- Parameters:
n- - the number of samples- Returns:
- - n samples from the distribution
-
getProcess
Description copied from class:ContinuousDistributionGets the process representation with actual distribution parameters. Returns a MatrixCell containing the distribution parameters.- Specified by:
getProcessin classContinuousDistribution- Returns:
- MatrixCell with distribution-specific parameters
-
mean
public double mean()Property alias for getMean- Overrides:
meanin classDistribution
-
rate
public double rate()Property alias for getRate- Overrides:
ratein classDistribution
-
scv
public double scv()Property alias for getSCV- Overrides:
scvin classDistribution
-
skewness
public double skewness()Property alias for getSkewness- Overrides:
skewnessin classDistribution
-
var
public double var()Property alias for getVar- Overrides:
varin classDistribution
-
process
Property alias for getProcess
-