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 Summary

    Fields
    Modifier and Type
    Field
    Description
    protected int
     
    protected MatrixCell
     

    Fields inherited from class jline.lang.processes.Distribution

    immediate, mean, name, numParam, params, support
  • Constructor Summary

    Constructors
    Constructor
    Description
    Markovian(String name, int numParam)
    Creates a new Markovian distribution with the specified name and parameter count.
  • Method Summary

    Modifier and Type
    Method
    Description
    acf(int maxLag)
    Kotlin-style property alias for getACF()
    D(int i)
    Gets the i-th matrix of the Markovian arrival process representation.
    Kotlin-style property alias for getEmbedded()
    Kotlin-style property alias for getEmbeddedProb()
    double
    evalCDF(double t)
    Evaluates the cumulative distribution function at the given point.
    double[]
    evalCDF(double[] tset)
    Evaluates the cumulative distribution function at multiple points.
    double
    evalLST(double s)
    Evaluate the Laplace-Stieltjes Transform at s
    double
    evalMeanT(double t)
    Evaluates the mean count at time t.
    double
    evalVarT(double t)
    Evaluates the variance count at time t.
    getACF(Matrix lags)
    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.
    double
    Gets the index of dispersion for counts (IDC).
    double
    Gets the index of dispersion for intervals (IDI).
    Gets the initial probability vector.
    double
    Gets the mean of this Markovian distribution.
    Gets the first three moments of this distribution.
    Gets the diagonal rate matrix containing the negative diagonal elements of D0.
    long
    Gets the number of phases in this Markovian distribution.
    Gets the exit probability vector (phi).
    Gets the matrix representation of this Markovian process.
    double
    Gets the rate of this distribution (inverse of mean).
    double
    Gets the squared coefficient of variation (SCV) of this distribution.
    double
    Gets the skewness of this distribution.
     
    double
    Gets the variance of this distribution.
    double
     
    double
    idc()
    Kotlin-style property alias for getIDC()
    double
    idi()
    Kotlin-style property alias for getIDI()
    Kotlin-style property alias for getInitProb()
    double
    Kotlin-style property alias for getMean()
    Kotlin-style property alias for getMoments()
    mu()
    Kotlin-style property alias for getMu()
    long
    Kotlin-style property alias for getNumberOfPhases()
    long
    Kotlin-style property alias for getNumberOfPhases()
    phi()
    Kotlin-style property alias for getPhi()
    Kotlin-style property alias for getProcess()
    double
    Kotlin-style property alias for getRate()
    double[]
    sample(int n)
    Generates random samples from this distribution using default random generator.
    double[]
    sample(int n, Random random)
    Generates random samples from this distribution using the specified random generator.
    double
    scv()
    Kotlin-style property alias for getSCV()
    void
    setMean(double newMean)
    Sets the mean of this Markovian distribution by scaling the process.
    void
    Sets the matrix representation of this Markovian process.
    void
    setRate(double newRate)
    Sets the rate of this Markovian distribution by scaling the process.
    double
    Kotlin-style property alias for getSkewness()
    Kotlin-style property alias for getSubgenerator()
    double
    var()
    Kotlin-style property alias for getVar()
    double
    Kotlin-style property alias for getVariance()

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface jline.lang.Copyable

    copy
  • 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
    • 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
    • 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()
      Kotlin-style property alias for getMean()
      Overrides:
      mean in class Distribution
    • rate

      public double rate()
      Kotlin-style property alias for getRate()
      Overrides:
      rate in class Distribution
    • scv

      public double scv()
      Kotlin-style property alias for getSCV()
      Overrides:
      scv in class Distribution
    • skewness

      public double skewness()
      Kotlin-style property alias for getSkewness()
      Overrides:
      skewness in class Distribution
    • var

      public double var()
      Kotlin-style property alias for getVar()
      Overrides:
      var in class Distribution
    • variance

      public double variance()
      Kotlin-style property alias for getVariance()
    • acf

      public Matrix acf(int maxLag)
      Kotlin-style property alias for getACF()
    • embedded

      public Matrix embedded()
      Kotlin-style property alias for getEmbedded()
    • embeddedProb

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

      public Matrix initProb()
      Kotlin-style property alias for getInitProb()
    • moments

      public List<Double> moments()
      Kotlin-style property alias for getMoments()
    • mu

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

      public Matrix phi()
      Kotlin-style property alias for getPhi()
    • process

      public MatrixCell process()
      Kotlin-style property alias for getProcess()
    • subgenerator

      public Matrix subgenerator()
      Kotlin-style property alias for getSubgenerator()