Class Markovian
-
- All Implemented Interfaces:
-
java.io.Serializable,jline.lang.Copyable
public class Markovian extends ContinuousDistribution implements Serializable
An abstract class for a Markovian distribution
-
-
Method Summary
Modifier and Type Method Description MatrixD(int i)Gets the i-th matrix of the Markovian arrival process representation. doubleevalCDF(double t)Evaluates the cumulative distribution function at the given point. Array<double>evalCDF(Array<double> tset)Evaluates the cumulative distribution function at multiple points. doubleevalLST(double s)Evaluate the Laplace-Stieltjes Transform at s doubleevalMeanT(double t)Evaluates the mean count at time t. doubleevalVarT(double t)Evaluates the variance count at time t. MatrixgetACF(Matrix lags)Gets the autocorrelation function at the specified lags. MatrixgetEmbedded()Gets the embedded Markov chain transition matrix. MatrixgetEmbeddedProb()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). MatrixgetInitProb()Gets the initial probability vector. doublegetMean()Gets the mean of this Markovian distribution. voidsetMean(double newMean)Sets the mean of this Markovian distribution by scaling the process. List<Double>getMoments()Gets the first three moments of this distribution. MatrixgetMu()Gets the diagonal rate matrix containing the negative diagonal elements of D0. longgetNumberOfPhases()Gets the number of phases in this Markovian distribution. MatrixgetPhi()Gets the exit probability vector (phi). MatrixCellgetProcess()Gets the matrix representation of this Markovian process. voidsetProcess(MatrixCell D)Sets the matrix representation of this Markovian process. doublegetRate()Gets the rate of this distribution (inverse of mean). voidsetRate(double newRate)Sets the rate of this Markovian distribution by scaling the process. doublegetSCV()Gets the squared coefficient of variation (SCV) of this distribution. doublegetSkewness()Gets the skewness of this distribution. MatrixgetSubgenerator()doublegetVar()Gets the variance of this distribution. doublegetVariance()Array<double>sample(int n)Generates random samples from this distribution using default random generator. Array<double>sample(int n, Random random)Generates random samples from this distribution using the specified random generator. doublemean()Kotlin-style property alias for getMean() doublerate()Kotlin-style property alias for getRate() doublescv()Kotlin-style property alias for getSCV() doubleskewness()Kotlin-style property alias for getSkewness() doublevar()Kotlin-style property alias for getVar() doublevariance()Kotlin-style property alias for getVariance() Matrixacf(int maxLag)Kotlin-style property alias for getACF() Matrixembedded()Kotlin-style property alias for getEmbedded() MatrixembeddedProb()Kotlin-style property alias for getEmbeddedProb() doubleidc()Kotlin-style property alias for getIDC() doubleidi()Kotlin-style property alias for getIDI() MatrixinitProb()Kotlin-style property alias for getInitProb() List<Double>moments()Kotlin-style property alias for getMoments() Matrixmu()Kotlin-style property alias for getMu() longnumberOfPhases()Kotlin-style property alias for getNumberOfPhases() longnumPhases()Kotlin-style property alias for getNumberOfPhases() Matrixphi()Kotlin-style property alias for getPhi() MatrixCellprocess()Kotlin-style property alias for getProcess() Matrixsubgenerator()Kotlin-style property alias for getSubgenerator() -
Methods inherited from class jline.lang.processes.Distribution
evalProbInterval, getName, getNumParams, getParam, getSupport, isContinuous, isDisabled, isDiscrete, isImmediate, isMarkovian, name, numParams, param, setNumParams, setParam, support -
Methods inherited from class jline.lang.Copyable
copy -
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
-
Constructor Detail
-
Markovian
Markovian(String name, int numParam)
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 Detail
-
D
Matrix D(int i)
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
double evalCDF(double t)
Evaluates the cumulative distribution function at the given point.
- Parameters:
t- the point at which to evaluate the CDF- Returns:
the CDF value at point t
-
evalCDF
Array<double> evalCDF(Array<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
double evalLST(double s)
Evaluate the Laplace-Stieltjes Transform at s
- Parameters:
s- the Laplace domain variable- Returns:
the LST value at s
-
evalMeanT
double evalMeanT(double t)
Evaluates the mean count at time t.
- Parameters:
t- the time point- Returns:
the mean count at time t
-
evalVarT
double evalVarT(double t)
Evaluates the variance count at time t.
- Parameters:
t- the time point- Returns:
the variance count at time t
-
getACF
Matrix getACF(Matrix lags)
Gets the autocorrelation function at the specified lags.
- Parameters:
lags- matrix of lag values- Returns:
matrix of autocorrelation values
-
getEmbedded
Matrix getEmbedded()
Gets the embedded Markov chain transition matrix.
- Returns:
the embedded chain matrix
-
getEmbeddedProb
Matrix getEmbeddedProb()
Gets the stationary probability vector of the embedded Markov chain.
- Returns:
the embedded chain stationary probabilities
-
getIDC
double getIDC()
Gets the index of dispersion for counts (IDC).
- Returns:
the IDC value
-
getIDI
double getIDI()
Gets the index of dispersion for intervals (IDI). For renewal processes, IDI = IDC.
- Returns:
the IDI value
-
getInitProb
Matrix getInitProb()
Gets the initial probability vector.
- Returns:
the initial probabilities
-
getMean
double getMean()
Gets the mean of this Markovian distribution.
- Returns:
the mean value, or NaN if the process contains NaN values
-
setMean
void setMean(double newMean)
Sets the mean of this Markovian distribution by scaling the process.
- Parameters:
newMean- the new mean value
-
getMoments
List<Double> getMoments()
Gets the first three moments of this distribution.
- Returns:
list containing the first, second, and third moments
-
getMu
Matrix getMu()
Gets the diagonal rate matrix containing the negative diagonal elements of D0.
- Returns:
column vector of rates
-
getNumberOfPhases
long getNumberOfPhases()
Gets the number of phases in this Markovian distribution.
- Returns:
the number of phases
-
getPhi
Matrix getPhi()
Gets the exit probability vector (phi).
- Returns:
column vector of exit probabilities for each phase
-
getProcess
MatrixCell getProcess()
Gets the matrix representation of this Markovian process.
- Returns:
MatrixCell containing D0, D1, ... matrices
-
setProcess
void setProcess(MatrixCell D)
Sets the matrix representation of this Markovian process.
- Parameters:
D- MatrixCell containing D0, D1, ...
-
getRate
double getRate()
Gets the rate of this distribution (inverse of mean).
- Returns:
the rate value (1/mean)
-
setRate
void setRate(double newRate)
Sets the rate of this Markovian distribution by scaling the process.
- Parameters:
newRate- the new rate value
-
getSCV
double getSCV()
Gets the squared coefficient of variation (SCV) of this distribution. SCV = Var(X) / E[X]^2.
- Returns:
the squared coefficient of variation
-
getSkewness
double getSkewness()
Gets the skewness of this distribution. Skewness measures the asymmetry of the probability distribution.
- Returns:
the skewness value
-
getSubgenerator
Matrix getSubgenerator()
-
getVar
double getVar()
Gets the variance of this distribution. Computed as SCV * mean^2.
- Returns:
the variance
-
getVariance
double getVariance()
-
sample
Array<double> sample(int n)
Generates random samples from this distribution using default random generator.
- Parameters:
n- the number of samples to generate- Returns:
array of random samples
-
sample
Array<double> sample(int n, Random random)
Generates random samples from this distribution using the specified random generator.
- Parameters:
n- the number of samples to generaterandom- the random number generator to use- Returns:
array of random samples
-
mean
double mean()
Kotlin-style property alias for getMean()
-
rate
double rate()
Kotlin-style property alias for getRate()
-
scv
double scv()
Kotlin-style property alias for getSCV()
-
skewness
double skewness()
Kotlin-style property alias for getSkewness()
-
var
double var()
Kotlin-style property alias for getVar()
-
variance
double variance()
Kotlin-style property alias for getVariance()
-
embeddedProb
Matrix embeddedProb()
Kotlin-style property alias for getEmbeddedProb()
-
idc
double idc()
Kotlin-style property alias for getIDC()
-
idi
double idi()
Kotlin-style property alias for getIDI()
-
numberOfPhases
long numberOfPhases()
Kotlin-style property alias for getNumberOfPhases()
-
numPhases
long numPhases()
Kotlin-style property alias for getNumberOfPhases()
-
process
MatrixCell process()
Kotlin-style property alias for getProcess()
-
subgenerator
Matrix subgenerator()
Kotlin-style property alias for getSubgenerator()
-
-
-
-