Package jline.api

Class MC

java.lang.Object
jline.api.MC

public class MC extends Object
APIs for Markov Chains.
  • Constructor Details

    • MC

      public MC()
  • Method Details

    • dtmc_stochcomp

      public static Matrix dtmc_stochcomp(Matrix P, List<Integer> I)
      Returns the stochastic complement of a DTMC
      Parameters:
      P - Transition matrix of the DTMC
      I - Indexes of states to be kept in the stochastic complement
      Returns:
      Transition matrix of the stochastic complement
      Throws:
      RuntimeException - If the transition matrix is null
    • dtmc_solve

      public static Matrix dtmc_solve(Matrix P)
      Returns the steady-state solution of a DTMC.
      Parameters:
      P - Transition matrix of the DTMC
      Returns:
      Steady-state solution vector of the DTMC
    • dtmc_timereverse

      public static Matrix dtmc_timereverse(Matrix P)
      Compute the infinitesimal generator of the time-reversed DTMC.
      Parameters:
      P - Infinitesimal generator of the DTMC
      Returns:
      Infinitesimal generator of the time-reversed DTMC
    • ctmc_solve

      public static Matrix ctmc_solve(Matrix Q)
      Return the steady-state probability of a CTMC.
      Parameters:
      Q - Infinitesimal generator of the CTMC
      Returns:
      Steady-state probability vector
    • ctmc_uniformization

      public static Matrix ctmc_uniformization(Matrix pi0, Matrix Q, double t)
      Return the transient probability distribution of the CTMC via the uniformization method.
      Parameters:
      pi0 - Initial state the CTMC
      Q - Infinitesimal generator of the CTMC
      t - Transient analysis period boundary [0,t]
      Returns:
      Transient probability vector at time t
    • ctmc_makeinfgen

      public static Matrix ctmc_makeinfgen(Matrix Q)
      Normalize the input matrix diagonal to be an infinitesimal generator.
      Parameters:
      Q - Candidate infinitesimal generator of the CTMC
      Returns:
      Infinitesimal generator
    • ctmc_timereverse

      public static Matrix ctmc_timereverse(Matrix Q)
      Compute the infinitesimal generator of the time-reserved CTMC
      Parameters:
      Q - Infinitesimal generator of the CTMC
      Returns:
      Infinitesimal generator of the time-reversed CTMC
    • dtmc_makestochastic

      public static Matrix dtmc_makestochastic(Matrix P)
      Normalize a given non-negative matrix into a DTMC
      Parameters:
      P - nonegative matrix
      Returns:
      Transition matrix of the DTMC
    • dtmc_rand

      public static Matrix dtmc_rand(int length)
      Form a random infinitesimal generator of a DTMC
      Parameters:
      length - size of random matrix
      Returns:
      Infinitesimal generator of CTMC
    • ctmc_rand

      public static Matrix ctmc_rand(int length)
      Form a random infinitesimal generator of a CTMC
      Parameters:
      length - size of random matrix
      Returns:
      Infinitesimal generator of CTMC
    • ctmc_simulate

      public static Ret.ctmcSimulation ctmc_simulate(Matrix Q, double[] pi0, int n)
      Form a random infinitesimal generator of CTMC
      Parameters:
      Q - infinitesimal generator of CTMC
      pi0 - initial state distribution vector
      n - times of simulations
      Returns:
      Infinitesimal generator of CTMC