std_dev::percentile

Trait OrderedListIndex

source
pub trait OrderedListIndex {
    // Required method
    fn index(&self, len: usize) -> MeanValue<usize>;
}
Expand description

Trait to get the index of a sorted list. Implemented by Fraction, KthSmallest, and KthLargest.

The target list does not need to be a list, but indexable, and does not need to be sorted, as long as the k-th smallest element is accessible (which it is for all lists, see percentile_rand).

Required Methods§

source

fn index(&self, len: usize) -> MeanValue<usize>

Returns the index this object is targeting. Could be either a single value or the mean of two.

Implementors§