Function indxvec::merge::rank[][src]

pub fn rank<T>(s: &[T], ascending: bool) -> Vec<usize> where
    T: PartialOrd + Copy
Expand description

Fast ranking of many T items, with only n*(log(n)+1) complexity. Ranking is done by inverting the sort index.
Sort index is in sorted order, giving data positions. Ranking is in data order, giving sorted order positions. Thus sort index and ranks are in an inverse relationship. They are easily converted by .invindex() (for: invert index).