pub trait NullStorable: Default {
fn has_primitive_null() -> bool {
false
}
fn is_null(&self) -> bool {
false
}
fn is_not_null(&self) -> bool {
true
}
}
pub trait Slicer: Sized {
type Scalar;
fn len(&self) -> usize;
fn iloc(&self, location: &usize) -> Self::Scalar;
unsafe fn iloc_unchecked(&self, location: &usize) -> Self::Scalar;
fn ilocs(&self, locations: &[usize]) -> Self;
unsafe fn ilocs_unchecked(&self, locations: &[usize]) -> Self;
fn ilocs_forced(&self, locations: &[usize]) -> Self;
fn blocs(&self, flags: &[bool]) -> Self;
fn reindex(&self, locations: &[usize]) -> Self {
self.ilocs(locations)
}
unsafe fn reindex_unchecked(&self, locations: &[usize]) -> Self {
self.ilocs_unchecked(locations)
}
fn reindex_forced(&self, locations: &[usize]) -> Self {
self.ilocs_forced(locations)
}
}
pub trait BasicAggregation {
type Kept;
type Counted;
fn sum(&self) -> Self::Kept;
fn count(&self) -> Self::Counted;
}
pub trait NumericAggregation {
type Coerced;
fn mean(&self) -> Self::Coerced;
fn var(&self) -> Self::Coerced;
fn unbiased_var(&self) -> Self::Coerced;
fn std(&self) -> Self::Coerced;
fn unbiased_std(&self) -> Self::Coerced;
}
pub trait ComparisonAggregation {
type Kept;
fn min(&self) -> Self::Kept;
fn max(&self) -> Self::Kept;
}