pub trait MapValidVec<T: IsNone>: Vec1View<T> {
// Provided methods
fn vdiff<'a>(
&'a self,
n: i32,
value: Option<T>,
) -> Box<dyn TrustedLen<Item = T> + 'a>
where T: Clone + Sub<Output = T> + Zero + 'a,
Self: 'a { ... }
fn vpct_change<'a>(&'a self, n: i32) -> Box<dyn TrustedLen<Item = f64> + 'a>
where T: Clone + Cast<f64> + 'a,
Self: 'a { ... }
fn vrank<O: Vec1<OT>, OT: IsNone>(&self, pct: bool, rev: bool) -> O
where T: IsNone + PartialEq,
T::Inner: PartialOrd,
f64: Cast<OT> { ... }
fn varg_partition<'a>(
&'a self,
kth: usize,
sort: bool,
rev: bool,
) -> Box<dyn TrustedLen<Item = i32> + 'a>
where T::Inner: Number,
T: 'a { ... }
fn vpartition<'a>(
&'a self,
kth: usize,
sort: bool,
rev: bool,
) -> Box<dyn TrustedLen<Item = T> + 'a>
where T::Inner: PartialOrd,
T: 'a { ... }
}Expand description
Trait for vector-like types that support map operations on valid elements.
This trait provides methods for performing various operations on vectors, such as calculating differences, percentage changes, rankings, and partitions.
Provided Methods§
Sourcefn vpct_change<'a>(&'a self, n: i32) -> Box<dyn TrustedLen<Item = f64> + 'a>
fn vpct_change<'a>(&'a self, n: i32) -> Box<dyn TrustedLen<Item = f64> + 'a>
Sourcefn varg_partition<'a>(
&'a self,
kth: usize,
sort: bool,
rev: bool,
) -> Box<dyn TrustedLen<Item = i32> + 'a>
fn varg_partition<'a>( &'a self, kth: usize, sort: bool, rev: bool, ) -> Box<dyn TrustedLen<Item = i32> + 'a>
Sourcefn vpartition<'a>(
&'a self,
kth: usize,
sort: bool,
rev: bool,
) -> Box<dyn TrustedLen<Item = T> + 'a>where
T::Inner: PartialOrd,
T: 'a,
fn vpartition<'a>(
&'a self,
kth: usize,
sort: bool,
rev: bool,
) -> Box<dyn TrustedLen<Item = T> + 'a>where
T::Inner: PartialOrd,
T: 'a,
sort: whether to sort the result by the size of the element
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.