Package jdistlib

Class PhaseType

All Implemented Interfaces:
AtomAwareDistribution, SupportedDistribution

public final class PhaseType extends GenericDistribution implements SupportedDistribution, AtomAwareDistribution
Continuous phase-type law with an optional atom at zero.

The initial transient-state probabilities need only sum to at most one; the remainder is the probability of starting in the absorbing state. The rate matrix is a transient subgenerator.

  • Constructor Details

    • PhaseType

      public PhaseType(double[] initial, double[][] rates)
  • Method Details

    • density

      public static double density(double x, double[] initial, double[][] rates, boolean log)
    • cumulative

      public static double cumulative(double x, double[] initial, double[][] rates, boolean lowerTail, boolean logP)
    • quantile

      public static double quantile(double p, double[] initial, double[][] rates, boolean lowerTail, boolean logP)
    • random

      public static double random(double[] initial, double[][] rates, RandomEngine random)
    • density

      public double density(double x, boolean log)
      Specified by:
      density in class GenericDistribution
    • cumulative

      public double cumulative(double x, boolean lowerTail, boolean logP)
      Specified by:
      cumulative in class GenericDistribution
    • quantile

      public double quantile(double p, boolean lowerTail, boolean logP)
      Specified by:
      quantile in class GenericDistribution
    • random

      public double random()
      Specified by:
      random in class GenericDistribution
    • atomProbability

      public double atomProbability(double x)
      Description copied from interface: AtomAwareDistribution
      Returns P(X = x); zero means no declared atom at x.
      Specified by:
      atomProbability in interface AtomAwareDistribution
    • getLowerBound

      public double getLowerBound()
      Specified by:
      getLowerBound in interface SupportedDistribution
    • getUpperBound

      public double getUpperBound()
      Specified by:
      getUpperBound in interface SupportedDistribution
    • getInitialProbabilities

      public double[] getInitialProbabilities()
    • getRateMatrix

      public double[][] getRateMatrix()