Class HyperExp

All Implemented Interfaces:
Serializable

public class HyperExp extends Markovian implements Serializable
A hyper-exponential distribution.
See Also:
  • Constructor Details

    • HyperExp

      public HyperExp(double p, double lambda1, double lambda2)
    • HyperExp

      public HyperExp(double p, double lambda)
  • Method Details

    • fitMeanAndSCV

      public static HyperExp fitMeanAndSCV(double mean, double scv)
      Fit distribution with given mean and squared coefficient of variation (SCV=variance/mean^2)
    • fitMeanAndSCVBalanced

      public static HyperExp fitMeanAndSCVBalanced(double mean, double scv)
      Fit distribution with given squared coefficient of variation and balanced means i.e., p/mu1 = (1-p)/mu2
    • sample

      public double[] sample(int n)
      Gets n samples from the distribution
      Overrides:
      sample in class Markovian
      Parameters:
      n - - the number of samples
      Returns:
      - n samples from the distribution
    • sample

      public double[] sample(int n, Random random)
      Overrides:
      sample in class Markovian
    • getNumberOfPhases

      public long getNumberOfPhases()
      Overrides:
      getNumberOfPhases in class Markovian
    • evalCDF

      public double evalCDF(double t)
      Overrides:
      evalCDF in class Markovian
    • evalLST

      public double evalLST(double s)
      Overrides:
      evalLST in class Markovian
    • getSCV

      public double getSCV()
      Overrides:
      getSCV in class Markovian
    • getRate

      public double getRate()
      Overrides:
      getRate in class Markovian
    • getMean

      public double getMean()
      Overrides:
      getMean in class Markovian
    • getVar

      public double getVar()
      Overrides:
      getVar in class Markovian
    • getSkewness

      public double getSkewness()
      Overrides:
      getSkewness in class Markovian
    • toString

      public String toString()
      Overrides:
      toString in class Object