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) Property alias for getACFD(int i) Gets the i-th matrix of the Markovian arrival process representation.embedded()Property alias for getEmbeddedProperty alias for getEmbeddedProbdoubleevalCDF(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 sorg.apache.commons.math3.complex.ComplexevalLST(org.apache.commons.math3.complex.Complex s) The transform at a COMPLEX argument, pie (sI - D0)^-1 (-D0 e), which is the same closed form as the real overload and is ANALYTIC, so it serves the arguments off the real axis that transform inversion and root location need.doubleevalMeanT(double t) Evaluates the mean count at time t.doubleevalVarT(double t) Evaluates the variance count at time t.getACF(double[] lags) Computes the autocorrelation of the inter-event times at the given lags, supplied as a plain array.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()Property alias for getIDCdoubleidi()Property alias for getIDIinitProb()Property alias for getInitProbdoublemean()Property alias for getMeanmoments()Property alias for getMomentsmu()Property alias for getMulongProperty alias for getNumberOfPhaseslongProperty alias for getNumberOfPhasesphi()Property alias for getPhiprocess()Property alias for getProcessdoublerate()Property alias for getRatedouble[]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()Property alias for getSCVvoidsetMean(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()Property alias for getSkewnessProperty alias for getSubgeneratordoublevar()Property alias for getVardoublevariance()Property alias for getVarianceMethods 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
-
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
-
evalLST
public org.apache.commons.math3.complex.Complex evalLST(org.apache.commons.math3.complex.Complex s) The transform at a COMPLEX argument, pie (sI - D0)^-1 (-D0 e), which is the same closed form as the real overload and is ANALYTIC, so it serves the arguments off the real axis that transform inversion and root location need. Overrides the CDF sum ofDistribution.evalLST(Complex), which would be a truncation where this is exact.- Overrides:
evalLSTin classDistribution- 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
-
getACF
Computes the autocorrelation of the inter-event times at the given lags, supplied as a plain array.- Parameters:
lags- the lags at which to evaluate the autocorrelation- 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()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
-
variance
public double variance()Property alias for getVariance -
acf
Property alias for getACF -
embedded
Property alias for getEmbedded -
embeddedProb
Property alias for getEmbeddedProb -
idc
public double idc()Property alias for getIDC -
idi
public double idi()Property alias for getIDI -
initProb
Property alias for getInitProb -
moments
Property alias for getMoments -
mu
Property alias for getMu -
numberOfPhases
public long numberOfPhases()Property alias for getNumberOfPhases -
numPhases
public long numPhases()Property alias for getNumberOfPhases -
phi
Property alias for getPhi -
process
Property alias for getProcess -
subgenerator
Property alias for getSubgenerator
-