pub struct FuncData<T, F> { /* private fields */ }Expand description
FuncData is a convenient way to box up a &[T]->T style function as one that acts on coordinates instead by wrapping it with a handle to the relevant Data.
Implementations§
Trait Implementations§
Source§impl<T: Hash + PartialEq + 'static, F: Fn(&[&T]) -> T + 'static> Aggregator for FuncData<T, F>
impl<T: Hash + PartialEq + 'static, F: Fn(&[&T]) -> T + 'static> Aggregator for FuncData<T, F>
Source§fn aggregate(&self, ks: &[usize]) -> usize
fn aggregate(&self, ks: &[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>
fn agg_clone(&self) -> Box<dyn Aggregator>
Clone, jammed into the trait to avoid multitrait problems
Auto Trait Implementations§
impl<T, F> Freeze for FuncData<T, F>
impl<T, F> !RefUnwindSafe for FuncData<T, F>
impl<T, F> !Send for FuncData<T, F>
impl<T, F> !Sync for FuncData<T, F>
impl<T, F> Unpin for FuncData<T, F>
impl<T, F> !UnwindSafe for FuncData<T, F>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more