Skip to main content

gestalt_edge

Function gestalt_edge 

Source
pub fn gestalt_edge(
    a: &[char],
    b: &[char],
    sam_b: &Sam,
    threshold: f64,
) -> Option<f64>
Expand description

Edge test that also yields the exact ratio: Some(ratio) iff RO(a,b) >= threshold, else None. Keeps the reject early-exit (abort the instant the upper bound M + Σ min(window) < need) but computes full M on the qualifying branch so the cached ratio feeds the cluster min_sim — caching edge ratios here means min_sim only recomputes the rare non-edge (chained) intra-cluster pairs, not the whole dense blob. Bit-identical to (let r = ratio; (r >= threshold).then_some(r)).