Function indxvec::merge::binsearch[][src]

pub fn binsearch<T>(s: &[T], val: T) -> usize where
    T: PartialOrd
Expand description

Binary search of a sorted list (in ascending order). Returns the index of the first item that is greater than val. When none are greater, returns s.len() (invalid index but logical). Example use: looking up cummulative probability density functions.