[−][src]Function ordist::distances::spearman_dist
pub fn spearman_dist<K: OrDistElement>(
v1: &[K],
v2: &[K]
) -> Result<usize, OrDistError<K>>
Spearman distance between 2 orders.
d_{Spear}(x,y) = \sum_{i=1}^{n}(r_{xi}-r_{yi})^{2}
r_{xi}
is the rank in x
of element i
.