Package jline.api.mam

Class Aph2_fit

java.lang.Object
jline.api.mam.Aph2_fit

public final class Aph2_fit extends Object
  • Method Details

    • aph2_fit

      public static Ret.mamAPH2Fit aph2_fit(double M1, double M2, double M3)
      Fits an acyclic phase-type (APH) distribution with two phases (APH(2)) to match the given moments of a random variable. This method attempts to fit an APH(2) distribution based on the first three moments (M1, M2, M3) of the distribution. If a valid APH(2) distribution cannot be directly obtained, the method adjusts the moments and retries the fitting process. If the fitting still fails, it throws an exception indicating that feasibility could not be restored.
      Parameters:
      M1 - the first moment (mean) of the distribution
      M2 - the second moment of the distribution
      M3 - the third moment of the distribution
      Returns:
      an object of type Ret.mamAPH2Fit containing the fitted APH(2) distribution and all possible fits
      Throws:
      RuntimeException - if the APH(2) fitting is not feasible with the given or adjusted moments