Class PH

All Implemented Interfaces:
Serializable, Copyable

public class PH extends Markovian
A general phase-type (PH) distribution
See Also:
  • Constructor Details

  • Method Details

    • evalCDF

      public double evalCDF(double t)
      Evaluates the cumulative distribution function (CDF) at time t. For a PH distribution, CDF(t) = 1 - alpha * exp(T*t) * e where alpha is the initial probability vector, T is the subgenerator, and e is a vector of ones.
      Overrides:
      evalCDF in class Markovian
      Parameters:
      t - the time value
      Returns:
      the CDF value at time t
    • evalLST

      public double evalLST(double s)
      Description copied from class: Distribution
      Evaluate the Laplace-Stieltjes Transform at s
      Overrides:
      evalLST in class Markovian
      Parameters:
      s - the Laplace domain variable
      Returns:
      the LST value at s
    • getInitProb

      public Matrix getInitProb()
      Description copied from class: Markovian
      Gets the initial probability vector.
      Overrides:
      getInitProb in class Markovian
      Returns:
      the initial probabilities
    • getMean

      public double getMean()
      Description copied from class: Markovian
      Gets the mean of this Markovian distribution.
      Overrides:
      getMean in class Markovian
      Returns:
      the mean value, or NaN if the process contains NaN values
    • getNumberOfPhases

      public long getNumberOfPhases()
      Description copied from class: Markovian
      Gets the number of phases in this Markovian distribution.
      Overrides:
      getNumberOfPhases in class Markovian
      Returns:
      the number of phases
    • getProcess

      public MatrixCell getProcess()
      Description copied from class: Markovian
      Gets the matrix representation of this Markovian process.
      Overrides:
      getProcess in class Markovian
      Returns:
      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 Markovian
      Returns:
      the rate value (1/mean)
    • 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.
      Overrides:
      getSCV in class Markovian
      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.
      Overrides:
      getSkewness in class Markovian
      Returns:
      the skewness value
    • getSubgenerator

      public Matrix getSubgenerator()
      Overrides:
      getSubgenerator in class Markovian
    • getVar

      public double getVar()
      Description copied from class: Distribution
      Gets the variance of this distribution. Computed as SCV * mean^2.
      Overrides:
      getVar in class Markovian
      Returns:
      the variance
    • 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 Markovian
      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.
      Overrides:
      sample in class Markovian
      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 Markovian
    • rate

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

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

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

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

      public Matrix initProb()
      Kotlin-style property alias for getInitProb()
      Overrides:
      initProb in class Markovian
    • numberOfPhases

      public long numberOfPhases()
      Kotlin-style property alias for getNumberOfPhases()
      Overrides:
      numberOfPhases in class Markovian
    • numPhases

      public long numPhases()
      Kotlin-style property alias for getNumberOfPhases()
      Overrides:
      numPhases in class Markovian
    • process

      public MatrixCell process()
      Kotlin-style property alias for getProcess()
      Overrides:
      process in class Markovian
    • subgenerator

      public Matrix subgenerator()
      Kotlin-style property alias for getSubgenerator()
      Overrides:
      subgenerator in class Markovian