Package jline.api.fj

Class FJ_maxima

java.lang.Object
jline.api.fj.FJ_maxima

public final class FJ_maxima extends Object
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Class
    Description
    static final class 
    [mu1, mu2, q, kmin, kmax] of fj_cox_fit.
    static final class 
    [Xmax, m1, c2] of fj_xmax_coxian.
  • Method Summary

    Modifier and Type
    Method
    Description
    fj_cox_fit(double m1, double c2)
    Marie's balanced-stage fit of a two-stage Coxian law to a target mean and squared coefficient of variation: requiring 1/mu1 = q/mu2 closes the system of two moment equations in three unknowns and gives mu1 = 2 mu, q = 1/(2 c2), mu2 = mu/c2, which needs c2 >= 0.5.
    static double
    fj_lst_max_het(double[] lambda, double s)
    Laplace-Stieltjes transform of the maximum of heterogeneous exponentials, by the Harrison-Zertal recurrence ( s + sum_{j=1..m} lambda_j ) L*_m = sum_{j=1..m} lambda_j L*_{m-1}(lambda \ j), anchored at L*_0 = 1 because the maximum of an empty collection is zero.
    fj_xmax_coxian(int K, double mu1, double mu2, double q)
    Exact expected maximum of K i.i.d.
    static double
    fj_xmax_het(double[] lambda)
     
    static double
    fj_xmax_het(double[] lambda, int n)
    Exact n-th moment of the maximum of K heterogeneous exponentials, by inclusion-exclusion on the survival function: E[Y^n] = sum over the nonempty subsets S of (-1)^(|S|+1) n! / (sum_S lambda_i)^n.
    static double
    fj_xmax_hz(double m1, double m2, int K)
    Harrison-Zertal closed form for K identically distributed branches given their first two moments, X_K^max ~ m1 + ( m2/(2 m1) ) ( H_K - 1 ).
    static double
    fj_xmax_hz_het(double[] m1, double[] m2, DoubleUnaryOperator[] cdf)
     
    static double
    fj_xmax_hz_het(double[] m1, double[] m2, DoubleUnaryOperator[] cdf, double tol, int npanels)
    Harrison-Zertal recurrence for independent but not identically distributed branches, each supplied through its first two moments and its distribution function: I(S) = (1/|S|) sum_{i in S} [ I(S \ i) + (m2_i/(2 m1_i)) L*_{S\i}(1/m1_i) ], anchored at I({i}) = m1_i.
    static double[]
    fj_xmax_moments_het(double[] lambda, int n)
    Moments of orders 1..n of the maximum of heterogeneous exponentials, by the n-th derivative of the transform recurrence at the origin: M_m(n) = [ n M_m(n-1) + sum_j lambda_j M_{m-1}(lambda \ j, n) ] / sum_j lambda_j.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Method Details

    • fj_xmax_het

      public static double fj_xmax_het(double[] lambda, int n)
      Exact n-th moment of the maximum of K heterogeneous exponentials, by inclusion-exclusion on the survival function: E[Y^n] = sum over the nonempty subsets S of (-1)^(|S|+1) n! / (sum_S lambda_i)^n. At n = 1 and K = 2 this collapses to 1/l1 + 1/l2 - 1/(l1+l2), and for equal rates to H_K/lambda.
    • fj_xmax_het

      public static double fj_xmax_het(double[] lambda)
    • fj_lst_max_het

      public static double fj_lst_max_het(double[] lambda, double s)
      Laplace-Stieltjes transform of the maximum of heterogeneous exponentials, by the Harrison-Zertal recurrence ( s + sum_{j=1..m} lambda_j ) L*_m = sum_{j=1..m} lambda_j L*_{m-1}(lambda \ j), anchored at L*_0 = 1 because the maximum of an empty collection is zero.
    • fj_xmax_moments_het

      public static double[] fj_xmax_moments_het(double[] lambda, int n)
      Moments of orders 1..n of the maximum of heterogeneous exponentials, by the n-th derivative of the transform recurrence at the origin: M_m(n) = [ n M_m(n-1) + sum_j lambda_j M_{m-1}(lambda \ j, n) ] / sum_j lambda_j. Eq. (30) of the survey prints the second sum WITHOUT the lambda_j weight; that form is not the derivative of Eq. (29) and misses the textbook two-variable answer, so the weight is restored here. fj_xmax_het is the independent inclusion-exclusion check.
    • fj_xmax_hz

      public static double fj_xmax_hz(double m1, double m2, int K)
      Harrison-Zertal closed form for K identically distributed branches given their first two moments, X_K^max ~ m1 + ( m2/(2 m1) ) ( H_K - 1 ). The correction is the equilibrium mean of the branch law scaled by H_K - 1, which is exact for the exponential and reduces to m1 at K = 1 for every branch law.
    • fj_xmax_hz_het

      public static double fj_xmax_hz_het(double[] m1, double[] m2, DoubleUnaryOperator[] cdf, double tol, int npanels)
      Harrison-Zertal recurrence for independent but not identically distributed branches, each supplied through its first two moments and its distribution function: I(S) = (1/|S|) sum_{i in S} [ I(S \ i) + (m2_i/(2 m1_i)) L*_{S\i}(1/m1_i) ], anchored at I({i}) = m1_i. The transform of the maximum over a sub-collection is recovered from the product of the distribution functions by composite Simpson quadrature.
    • fj_xmax_hz_het

      public static double fj_xmax_hz_het(double[] m1, double[] m2, DoubleUnaryOperator[] cdf)
    • fj_cox_fit

      public static FJ_maxima.FJCoxFitResult fj_cox_fit(double m1, double c2)
      Marie's balanced-stage fit of a two-stage Coxian law to a target mean and squared coefficient of variation: requiring 1/mu1 = q/mu2 closes the system of two moment equations in three unknowns and gives mu1 = 2 mu, q = 1/(2 c2), mu2 = mu/c2, which needs c2 >= 0.5.
    • fj_xmax_coxian

      public static FJ_maxima.FJXmaxCoxianResult fj_xmax_coxian(int K, double mu1, double mu2, double q)
      Exact expected maximum of K i.i.d. two-stage Coxian branches. The survival function is a two-term exponential mixture, so expanding 1 - (1-S)^K binomially and integrating term by term is closed: E[Y_K] = sum_j (-1)^(j+1) C(K,j) sum_i C(j,i) A^(j-i) B^i / ((j-i) mu1 + i mu2). At coincident stage rates the mixture degenerates into S(t) = (1 + q mu t) exp(-mu t), which is handled by the same expansion with the polynomial integrals.