Class Markovian

All Implemented Interfaces:
Serializable, Copyable
Direct Known Subclasses:
APH, Coxian, Erlang, Exp, HyperExp, MarkovModulated, ME, MMDP, PH, RAP

public class Markovian extends ContinuousDistribution implements Serializable
An abstract class for a Markovian distribution
See Also:
  • Field Details

    • process

      protected MatrixCell process
    • nPhases

      protected int nPhases
  • Constructor Details

    • Markovian

      public Markovian(String name, int numParam)
      Creates a new Markovian distribution with the specified name and parameter count.
      Parameters:
      name - the name of this distribution type
      numParam - the number of parameters
  • Method Details

    • D

      public 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

      public double evalCDF(double t)
      Evaluates the cumulative distribution function at the given point.
      Specified by:
      evalCDF in class Distribution
      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: Distribution
      Evaluate the Laplace-Stieltjes Transform at s
      Specified by:
      evalLST in class ContinuousDistribution
      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 of Distribution.evalLST(Complex), which would be a truncation where this is exact.
      Overrides:
      evalLST in class Distribution
      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

      public Matrix getACF(Matrix lags)
      Gets the autocorrelation function at the specified lags.
      Parameters:
      lags - matrix of lag values
      Returns:
      matrix of autocorrelation values
    • getACF

      public Matrix getACF(double[] lags)
      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

      public Matrix getEmbedded()
      Gets the embedded Markov chain transition matrix.
      Returns:
      the embedded chain matrix
    • getEmbeddedProb

      public 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

      public Matrix getInitProb()
      Gets the initial probability vector.
      Returns:
      the initial probabilities
    • getMean

      public double getMean()
      Gets the mean of this Markovian distribution.
      Specified by:
      getMean in class Distribution
      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

      public List<Double> getMoments()
      Gets the first three moments of this distribution.
      Returns:
      list containing the first, second, and third moments
    • getMu

      public Matrix 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

      public Matrix getPhi()
      Gets the exit probability vector (phi).
      Returns:
      column vector of exit probabilities for each phase
    • getProcess

      public MatrixCell getProcess()
      Gets the matrix representation of this Markovian process.
      Specified by:
      getProcess in class ContinuousDistribution
      Returns:
      MatrixCell containing D0, D1, ... matrices
    • setProcess

      public void setProcess(MatrixCell D)
      Sets the matrix representation of this Markovian process.
      Parameters:
      D - MatrixCell containing D0, D1, ... matrices
    • getRate

      public double getRate()
      Description copied from class: Distribution
      Gets the rate of this distribution (inverse of mean).
      Overrides:
      getRate in class Distribution
      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: Distribution
      Gets the squared coefficient of variation (SCV) of this distribution. SCV = Var(X) / E[X]^2.
      Specified by:
      getSCV in class Distribution
      Returns:
      the squared coefficient of variation
    • getSkewness

      public double getSkewness()
      Description copied from class: Distribution
      Gets the skewness of this distribution. Skewness measures the asymmetry of the probability distribution.
      Specified by:
      getSkewness in class Distribution
      Returns:
      the skewness value
    • getSubgenerator

      public Matrix getSubgenerator()
    • getVar

      public double getVar()
      Description copied from class: Distribution
      Gets the variance of this distribution. Computed as SCV * mean^2.
      Overrides:
      getVar in class Distribution
      Returns:
      the variance
    • getVariance

      public double getVariance()
    • sample

      public double[] sample(int n)
      Description copied from class: Distribution
      Generates random samples from this distribution using default random generator.
      Overrides:
      sample in class Distribution
      Parameters:
      n - the number of samples to generate
      Returns:
      array of random samples
    • sample

      public double[] sample(int n, Random random)
      Description copied from class: Distribution
      Generates random samples from this distribution using the specified random generator.
      Specified by:
      sample in class Distribution
      Parameters:
      n - the number of samples to generate
      random - the random number generator to use
      Returns:
      array of random samples
    • mean

      public double mean()
      Property alias for getMean
      Overrides:
      mean in class Distribution
    • rate

      public double rate()
      Property alias for getRate
      Overrides:
      rate in class Distribution
    • scv

      public double scv()
      Property alias for getSCV
      Overrides:
      scv in class Distribution
    • skewness

      public double skewness()
      Property alias for getSkewness
      Overrides:
      skewness in class Distribution
    • var

      public double var()
      Property alias for getVar
      Overrides:
      var in class Distribution
    • variance

      public double variance()
      Property alias for getVariance
    • acf

      public Matrix acf(int maxLag)
      Property alias for getACF
    • embedded

      public Matrix embedded()
      Property alias for getEmbedded
    • embeddedProb

      public Matrix embeddedProb()
      Property alias for getEmbeddedProb
    • idc

      public double idc()
      Property alias for getIDC
    • idi

      public double idi()
      Property alias for getIDI
    • initProb

      public Matrix initProb()
      Property alias for getInitProb
    • moments

      public List<Double> moments()
      Property alias for getMoments
    • mu

      public Matrix mu()
      Property alias for getMu
    • numberOfPhases

      public long numberOfPhases()
      Property alias for getNumberOfPhases
    • numPhases

      public long numPhases()
      Property alias for getNumberOfPhases
    • phi

      public Matrix phi()
      Property alias for getPhi
    • process

      public MatrixCell process()
      Property alias for getProcess
    • subgenerator

      public Matrix subgenerator()
      Property alias for getSubgenerator