verify_ncd_bounds

Function verify_ncd_bounds 

Source
pub fn verify_ncd_bounds<F>(ncd: F, x: &[u8], y: &[u8]) -> bool
where F: Fn(&[u8], &[u8]) -> f64,
Expand description

Verify NCD range: 0 ≤ NCD ≤ 1+epsilon.

NCD theoretically can slightly exceed 1 due to compression overhead, so we allow a small margin or just check it’s not egregiously large. Usually NCD <= 1.1 is safe.