Package jline.lang.processes
Class Erlang
java.lang.Object
jline.lang.processes.Distribution
jline.lang.processes.ContinuousDistribution
jline.lang.processes.Markovian
jline.lang.processes.Erlang
- All Implemented Interfaces:
Serializable,Copyable
An Erlang-n distribution with n phases.
- See Also:
-
Field Summary
-
Constructor Summary
ConstructorsConstructorDescriptionErlang(double phaseRate, int n) Creates an Erlang distribution with the specified phase rate and number of phases. -
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 ErlangfitMeanAndOrder(double mean, long numPhases) Creates an Erlang distribution fitted to the specified mean and number of phases.static ErlangfitMeanAndSCV(double mean, double SCV) Creates an Erlang distribution fitted to the specified mean and squared coefficient of variation.static ErlangfitMeanAndStdDev(double mean, double stdDev) Creates an Erlang distribution fitted to the specified mean and standard deviation.doublegetMean()Gets the mean of this Erlang distribution.doublegetRate()Gets the rate of this Erlang distribution.doublegetSCV()Gets the squared coefficient of variation.doubleGets the skewness of this Erlang distribution.doublegetVar()Gets the variance of this Erlang distribution.doublemean()Kotlin-style property alias for getMean()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()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, getNumberOfPhases, getPhi, getProcess, getSubgenerator, getVariance, idc, idi, initProb, moments, mu, numberOfPhases, numPhases, 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
-
Erlang
public Erlang(double phaseRate, int n) Creates an Erlang distribution with the specified phase rate and number of phases.- Parameters:
phaseRate- the rate parameter for each phasen- the number of phases
-
-
Method Details
-
fitMeanAndOrder
Creates an Erlang distribution fitted to the specified mean and number of phases.- Parameters:
mean- the desired mean valuenumPhases- the number of phases- Returns:
- an Erlang distribution with the specified characteristics
-
fitMeanAndSCV
Creates an Erlang distribution fitted to the specified mean and squared coefficient of variation.- Parameters:
mean- the desired mean valueSCV- the desired squared coefficient of variation- Returns:
- an Erlang distribution with the specified characteristics
-
fitMeanAndStdDev
Creates an Erlang distribution fitted to the specified mean and standard deviation.- Parameters:
mean- the desired mean valuestdDev- the desired standard deviation- Returns:
- an Erlang distribution with the specified characteristics
-
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 Erlang distribution. -
getRate
public double getRate()Gets the rate of this Erlang distribution. -
getSCV
public double getSCV()Gets the squared coefficient of variation. -
getSkewness
public double getSkewness()Gets the skewness of this Erlang distribution.- Overrides:
getSkewnessin classMarkovian- Returns:
- the skewness (2/√r)
-
getVar
public double getVar()Gets the variance of this Erlang distribution. -
sample
Description copied from class:DistributionGenerates random samples from this distribution using the specified random generator. -
sample
public double[] sample(int n) Description copied from class:DistributionGenerates random samples from this distribution using default random generator. -
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()
-