Package jline.lang.processes
Class Markovian
java.lang.Object
jline.lang.processes.Distribution
jline.lang.processes.ContinuousDistribution
jline.lang.processes.Markovian
- All Implemented Interfaces:
Serializable,Copyable
An abstract class for a Markovian distribution
- See Also:
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionacf(int maxLag) Kotlin-style property alias for getACF()D(int i) Gets the i-th matrix of the Markovian arrival process representation.embedded()Kotlin-style property alias for getEmbedded()Kotlin-style property alias for getEmbeddedProb()doubleevalCDF(double t) Evaluates the cumulative distribution function at the given point.double[]evalCDF(double[] tset) Evaluates the cumulative distribution function at multiple points.doubleevalLST(double s) Evaluate the Laplace-Stieltjes Transform at sdoubleevalMeanT(double t) Evaluates the mean count at time t.doubleevalVarT(double t) Evaluates the variance count at time t.Gets the autocorrelation function at the specified lags.Gets the embedded Markov chain transition matrix.Gets the stationary probability vector of the embedded Markov chain.doublegetIDC()Gets the index of dispersion for counts (IDC).doublegetIDI()Gets the index of dispersion for intervals (IDI).Gets the initial probability vector.doublegetMean()Gets the mean of this Markovian distribution.Gets the first three moments of this distribution.getMu()Gets the diagonal rate matrix containing the negative diagonal elements of D0.longGets the number of phases in this Markovian distribution.getPhi()Gets the exit probability vector (phi).Gets the matrix representation of this Markovian process.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.doubledoubleidc()Kotlin-style property alias for getIDC()doubleidi()Kotlin-style property alias for getIDI()initProb()Kotlin-style property alias for getInitProb()doublemean()Kotlin-style property alias for getMean()moments()Kotlin-style property alias for getMoments()mu()Kotlin-style property alias for getMu()longKotlin-style property alias for getNumberOfPhases()longKotlin-style property alias for getNumberOfPhases()phi()Kotlin-style property alias for getPhi()process()Kotlin-style property alias for getProcess()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()voidsetMean(double newMean) Sets the mean of this Markovian distribution by scaling the process.voidSets the matrix representation of this Markovian process.voidsetRate(double newRate) Sets the rate of this Markovian distribution by scaling the process.doubleskewness()Kotlin-style property alias for getSkewness()Kotlin-style property alias for getSubgenerator()doublevar()Kotlin-style property alias for getVar()doublevariance()Kotlin-style property alias for getVariance()Methods inherited from class jline.lang.processes.Distribution
evalProbInterval, getName, getNumParams, getParam, getSupport, isContinuous, isDisabled, isDiscrete, isImmediate, isMarkovian, name, numParams, param, setNumParams, setParam, support
-
Field Details
-
process
-
nPhases
protected int nPhases
-
-
Constructor Details
-
Markovian
Creates a new Markovian distribution with the specified name and parameter count.- Parameters:
name- the name of this distribution typenumParam- the number of parameters
-
-
Method Details
-
D
Gets the i-th matrix of the Markovian arrival process representation.- Parameters:
i- the matrix index (0 for D0, 1 for D1, etc.)- Returns:
- the matrix at index i
-
evalCDF
public double evalCDF(double t) Evaluates the cumulative distribution function 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
-
evalCDF
public double[] evalCDF(double[] tset) Evaluates the cumulative distribution function at multiple points.- Parameters:
tset- array of points at which to evaluate the CDF- Returns:
- array of CDF values
-
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
-
evalMeanT
public double evalMeanT(double t) Evaluates the mean count at time t.- Parameters:
t- the time point- Returns:
- the mean count at time t
-
evalVarT
public double evalVarT(double t) Evaluates the variance count at time t.- Parameters:
t- the time point- Returns:
- the variance count at time t
-
getACF
Gets the autocorrelation function at the specified lags.- Parameters:
lags- matrix of lag values- Returns:
- matrix of autocorrelation values
-
getEmbedded
Gets the embedded Markov chain transition matrix.- Returns:
- the embedded chain matrix
-
getEmbeddedProb
Gets the stationary probability vector of the embedded Markov chain.- Returns:
- the embedded chain stationary probabilities
-
getIDC
public double getIDC()Gets the index of dispersion for counts (IDC).- Returns:
- the IDC value
-
getIDI
public double getIDI()Gets the index of dispersion for intervals (IDI). For renewal processes, IDI = IDC.- Returns:
- the IDI value
-
getInitProb
Gets the initial probability vector.- Returns:
- the initial probabilities
-
getMean
public double getMean()Gets the mean of this Markovian distribution.- Specified by:
getMeanin classDistribution- Returns:
- the mean value, or NaN if the process contains NaN values
-
setMean
public void setMean(double newMean) Sets the mean of this Markovian distribution by scaling the process.- Parameters:
newMean- the new mean value
-
getMoments
Gets the first three moments of this distribution.- Returns:
- list containing the first, second, and third moments
-
getMu
Gets the diagonal rate matrix containing the negative diagonal elements of D0.- Returns:
- column vector of rates
-
getNumberOfPhases
public long getNumberOfPhases()Gets the number of phases in this Markovian distribution.- Returns:
- the number of phases
-
getPhi
Gets the exit probability vector (phi).- Returns:
- column vector of exit probabilities for each phase
-
getProcess
Gets the matrix representation of this Markovian process.- Specified by:
getProcessin classContinuousDistribution- Returns:
- MatrixCell containing D0, D1, ... matrices
-
setProcess
Sets the matrix representation of this Markovian process.- Parameters:
D- MatrixCell containing D0, D1, ... matrices
-
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)
-
setRate
public void setRate(double newRate) Sets the rate of this Markovian distribution by scaling the process.- Parameters:
newRate- the new rate value
-
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
-
getSubgenerator
-
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
-
getVariance
public double getVariance() -
sample
public double[] sample(int n) Description copied from class:DistributionGenerates random samples from this distribution using default random generator.- Overrides:
samplein classDistribution- Parameters:
n- the number of samples to generate- Returns:
- array of random samples
-
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
-
mean
public double mean()Kotlin-style property alias for getMean()- Overrides:
meanin classDistribution
-
rate
public double rate()Kotlin-style property alias for getRate()- Overrides:
ratein classDistribution
-
scv
public double scv()Kotlin-style property alias for getSCV()- Overrides:
scvin classDistribution
-
skewness
public double skewness()Kotlin-style property alias for getSkewness()- Overrides:
skewnessin classDistribution
-
var
public double var()Kotlin-style property alias for getVar()- Overrides:
varin classDistribution
-
variance
public double variance()Kotlin-style property alias for getVariance() -
acf
Kotlin-style property alias for getACF() -
embedded
Kotlin-style property alias for getEmbedded() -
embeddedProb
Kotlin-style property alias for getEmbeddedProb() -
idc
public double idc()Kotlin-style property alias for getIDC() -
idi
public double idi()Kotlin-style property alias for getIDI() -
initProb
Kotlin-style property alias for getInitProb() -
moments
Kotlin-style property alias for getMoments() -
mu
Kotlin-style property alias for getMu() -
numberOfPhases
public long numberOfPhases()Kotlin-style property alias for getNumberOfPhases() -
numPhases
public long numPhases()Kotlin-style property alias for getNumberOfPhases() -
phi
Kotlin-style property alias for getPhi() -
process
Kotlin-style property alias for getProcess() -
subgenerator
Kotlin-style property alias for getSubgenerator()
-