Package jline.lang.processes
Class Exp
java.lang.Object
jline.lang.processes.Distribution
jline.lang.processes.ContinuousDistribution
jline.lang.processes.Markovian
jline.lang.processes.Exp
- All Implemented Interfaces:
Serializable,Copyable
An exponential distribution.
- See Also:
-
Field Summary
-
Constructor Summary
ConstructorsConstructorDescriptionExp(double lambda) Creates an exponential distribution with the specified rate parameter. -
Method Summary
Modifier and TypeMethodDescriptiondoubleevalCDF(double t) Evaluates the cumulative distribution function at the given point.doubleevalLST(double s) Evaluates the Laplace-Stieltjes transform at the given point.static ExpfitMean(double MEAN) Creates an exponential distribution fitted to the specified mean.static ExpfitRate(double RATE) Creates an exponential distribution fitted to the specified rate.doublegetMean()Gets the mean of this exponential distribution.longGets the number of phases in this distribution.doublegetRate()Gets the rate parameter of this exponential distribution.doublegetSCV()Gets the squared coefficient of variation.doubleGets the skewness of this exponential distribution.doublegetVar()Gets the variance of this exponential distribution.doublemean()Kotlin-style property alias for getMean()longKotlin-style property alias for getNumberOfPhases()longKotlin-style property alias for getNumberOfPhases()doublerate()Kotlin-style property alias for getRate()double[]sample(int n) Generates random samples from this distribution using default random generator.double[]Generates random samples from this distribution using the specified random generator.doublescv()Kotlin-style property alias for getSCV()doubleskewness()Kotlin-style property alias for getSkewness()toString()voidupdateRate(double rate) Updates the rate parameter of this exponential distribution.doublevar()Kotlin-style property alias for getVar()Methods inherited from class jline.lang.processes.Markovian
acf, D, embedded, embeddedProb, evalCDF, evalMeanT, evalVarT, getACF, getEmbedded, getEmbeddedProb, getIDC, getIDI, getInitProb, getMoments, getMu, getPhi, getProcess, getSubgenerator, getVariance, idc, idi, initProb, moments, mu, phi, process, setMean, setProcess, setRate, subgenerator, varianceMethods inherited from class jline.lang.processes.Distribution
evalProbInterval, getName, getNumParams, getParam, getSupport, isContinuous, isDisabled, isDiscrete, isImmediate, isMarkovian, name, numParams, param, setNumParams, setParam, support
-
Constructor Details
-
Exp
public Exp(double lambda) Creates an exponential distribution with the specified rate parameter.- Parameters:
lambda- the rate parameter (must be positive)
-
-
Method Details
-
fitMean
Creates an exponential distribution fitted to the specified mean.- Parameters:
MEAN- the desired mean value- Returns:
- an exponential distribution with the specified mean
-
fitRate
Creates an exponential distribution fitted to the specified rate.- Parameters:
RATE- the desired rate value- Returns:
- an exponential distribution with the specified rate
-
evalCDF
public double evalCDF(double t) Evaluates the cumulative distribution function at the given point. -
evalLST
public double evalLST(double s) Evaluates the Laplace-Stieltjes transform at the given point. -
getMean
public double getMean()Gets the mean of this exponential distribution. -
getNumberOfPhases
public long getNumberOfPhases()Gets the number of phases in this distribution. Exponential distribution has a single phase.- Overrides:
getNumberOfPhasesin classMarkovian- Returns:
- always returns 1
-
getRate
public double getRate()Gets the rate parameter of this exponential distribution. -
getSCV
public double getSCV()Gets the squared coefficient of variation. For exponential distribution, SCV = 1. -
getSkewness
public double getSkewness()Gets the skewness of this exponential distribution.- Overrides:
getSkewnessin classMarkovian- Returns:
- always returns 2
-
getVar
public double getVar()Gets the variance of this exponential distribution. -
sample
public double[] sample(int n) Description copied from class:DistributionGenerates random samples from this distribution using default random generator. -
sample
Description copied from class:DistributionGenerates random samples from this distribution using the specified random generator. -
toString
-
updateRate
public void updateRate(double rate) Updates the rate parameter of this exponential distribution.- Parameters:
rate- the new rate parameter
-
numberOfPhases
public long numberOfPhases()Kotlin-style property alias for getNumberOfPhases()- Overrides:
numberOfPhasesin classMarkovian
-
numPhases
public long numPhases()Kotlin-style property alias for getNumberOfPhases() -
mean
public double mean()Kotlin-style property alias for getMean() -
rate
public double rate()Kotlin-style property alias for getRate() -
scv
public double scv()Kotlin-style property alias for getSCV() -
skewness
public double skewness()Kotlin-style property alias for getSkewness() -
var
public double var()Kotlin-style property alias for getVar()
-