Trait Aggregator

Source
pub trait Aggregator {
    // Required methods
    fn aggregate(&self, _: &[usize]) -> usize;
    fn agg_clone(&self) -> Box<dyn Aggregator>;
}
Expand description

The base aggregation trait. It is intentionally not parameterized over type so that Tuple operation remains fully generic.

Required Methods§

Source

fn aggregate(&self, _: &[usize]) -> usize

This is an associative, commutative function over points in some dataspace. Accepting more than two points is a hack to allow allocation skipping

Source

fn agg_clone(&self) -> Box<dyn Aggregator>

Clone, jammed into the trait to avoid multitrait problems

Implementors§

Source§

impl<F: Fn(&[bool]) -> bool + 'static> Aggregator for Func<F, bool>

Source§

impl<F: Fn(&[i8]) -> i8 + 'static> Aggregator for Func<F, i8>

Source§

impl<F: Fn(&[i16]) -> i16 + 'static> Aggregator for Func<F, i16>

Source§

impl<F: Fn(&[i32]) -> i32 + 'static> Aggregator for Func<F, i32>

Source§

impl<F: Fn(&[i64]) -> i64 + 'static> Aggregator for Func<F, i64>

Source§

impl<F: Fn(&[isize]) -> isize + 'static> Aggregator for Func<F, isize>

Source§

impl<F: Fn(&[u8]) -> u8 + 'static> Aggregator for Func<F, u8>

Source§

impl<F: Fn(&[u16]) -> u16 + 'static> Aggregator for Func<F, u16>

Source§

impl<F: Fn(&[u32]) -> u32 + 'static> Aggregator for Func<F, u32>

Source§

impl<F: Fn(&[u64]) -> u64 + 'static> Aggregator for Func<F, u64>

Source§

impl<F: Fn(&[usize]) -> usize + 'static> Aggregator for Func<F, usize>

Source§

impl<T: Hash + PartialEq + 'static, F: Fn(&[&T]) -> T + 'static> Aggregator for FuncData<T, F>