Trait RankExt

Source
pub trait RankExt<A, S, D>
where S: Data<Elem = A>,
{ // Required methods fn rank(&self, method: RankMethod) -> Array<usize, D>; fn discretize(&self, method: RankMethod, buckets: usize) -> Array<usize, D>; }

Required Methods§

Source

fn rank(&self, method: RankMethod) -> Array<usize, D>

Returns an array of the same size as the original, where each value is replaced with a rank. Zero is reserved for elements whose rank cannot be computed (i.e. NaN values in floating point matrices). The lowest rank is one.

Source

fn discretize(&self, method: RankMethod, buckets: usize) -> Array<usize, D>

Returns an array of the same size of the original, where each value is replaced with a bucket identifier. Zero is reserved for elements whose bucket cannot be computed (i.e. NaN values in floating point matrices). The lowest bucket is one and the maximum bucket is the given number.

Implementations on Foreign Types§

Source§

impl<A, S, D> RankExt<A, S, D> for ArrayBase<S, D>
where A: PartialOrd + Default, S: Data<Elem = A>, D: Dimension, <D as Dimension>::Pattern: NdIndex<D>,

Source§

fn rank(&self, method: RankMethod) -> Array<usize, D>

Source§

fn discretize(&self, method: RankMethod, buckets: usize) -> Array<usize, D>

Implementors§