Skip to main content

directed_hausdorff

Function directed_hausdorff 

Source
pub fn directed_hausdorff(
    u: &[Vec<f64>],
    v: &[Vec<f64>],
) -> Result<DirectedHausdorff, ErrorsJSL>
Expand description

The directed Hausdorff distance h(u, v) = max_{a ∈ u} min_{b ∈ v} ‖a − b‖ between point sets in any dimension (SciPy’s directed_hausdorff), by Taha and Hanbury’s early-break algorithm: the inner search over v stops as soon as some point is closer than the largest minimum found so far, since that a can no longer raise the maximum. SciPy shuffles the points first (with a fixed seed) to make early breaks likely; the library keeps the given order, which gives the same distance and, without ties, the same pair.