pub fn fit_ab(min_dist: f64, spread: f64) -> (f64, f64)Expand description
Fits the smooth curve 1 / (1 + a x^{2b}) to the target similarity profile: 1 up to min_dist
and an exponential decay of scale spread beyond it. Levenberg-Marquardt on (a, b).