pub trait SortedUniqueKernel: Array {
// Required methods
fn unique_fold<'a>(
fst: &'a Self,
others: impl Iterator<Item = &'a Self>,
) -> Self;
fn unique(&self) -> Self;
fn n_unique(&self) -> usize;
fn n_unique_non_null(&self) -> usize;
}
Expand description
Kernel to calculate the number of unique elements where the elements are already sorted.
Required Methods§
Sourcefn unique_fold<'a>(
fst: &'a Self,
others: impl Iterator<Item = &'a Self>,
) -> Self
fn unique_fold<'a>( fst: &'a Self, others: impl Iterator<Item = &'a Self>, ) -> Self
Calculate the set of unique elements in fst
and others
and fold the result into one
array.
Sourcefn unique(&self) -> Self
fn unique(&self) -> Self
Calculate the set of unique elements in Self
where we have no further information about
self
.
Sourcefn n_unique(&self) -> usize
fn n_unique(&self) -> usize
Calculate the number of unique elements in Self
A null is also considered a unique value
Sourcefn n_unique_non_null(&self) -> usize
fn n_unique_non_null(&self) -> usize
Calculate the number of unique non-null elements in Self
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.