Skip to main content

gestalt_edge_with_ms_delta

Function gestalt_edge_with_ms_delta 

Source
pub fn gestalt_edge_with_ms_delta(
    a: &[char],
    b: &[char],
    sam_b: &Sam,
    fstate: &[u32],
    fmatch: &[u32],
    threshold: f64,
    delta: f64,
) -> Option<f64>
Expand description

Approximate-RO variant: same as gestalt_edge_with_ms but caps the suffix-link chain walk inside longest_in to roughly 1/√delta ascents. delta = 0.0 means exact (no cap, default). delta ∈ (0, 1] caps the depth; the returned ratio’s worst-case absolute deviation from the exact RO is bounded by ~delta (empirically verified on canonical-Python corpora by tests/approx_ro.rs). The chain depth distribution on real workloads is heavy-headed (p99 ≈ 7), so even small delta values rarely actually fire the cap.