Package jline.api.mc

Class Smp_stage_quad

java.lang.Object
jline.api.mc.Smp_stage_quad

public final class Smp_stage_quad extends Object
Embedded jump probabilities P and mean holding time m of one semi-Markov stage whose transitions are given as in Smp_stage_cif: competing latent clocks when probs is null, a kernel (destination drawn on entry, then its sojourn law) when probs is an E-vector.

A kernel stage needs no quadrature: P = probs and m = sum_h probs[h] E[arcs[h]]. A competing stage has P[h] = CIF_h(Inf) and m = int_0^Inf prod_k (1-F_k(t)) dt, summed on a grid shared by all four codebases:

  • U starts at the largest arc mean and doubles until the joint survival is at most 1e-12, or until U reaches 1e8 times that mean (heavy tails);
  • the grid is 20001 equispaced points on [0,U], joined with 4001 points on [0, min(U, 40 E[arcs[k]])] and the instant E[arcs[k]] for every arc k, so a fast clock beside a slow one is resolved on its own scale and a Det arc jumps on a grid point;
  • P sums the Stieltjes increments of Smp_stage_cif and is renormalized to 1, and m is Simpson's rule per interval.
Every arc must have a finite positive mean. Port of MATLAB smp_stage_quad.m.
  • Method Details

    • smp_stage_quad

      public static Smp_stage_quad.Result smp_stage_quad(Distribution[] arcs, double[] probs)
    • unique

      public static double[] unique(double[] v)
      Sorted distinct values, as MATLAB unique.