Implement FoldMap's folds using a SumTree

This required passing a `Context` object to `Summary` and introducing a
new `SeekDimension` trait that allows comparing two dimensions and pass
an additional context object.
This commit is contained in:
Antonio Scandurra
2021-05-06 16:20:23 +02:00
parent 7fb7a6adfc
commit 901525bf77
9 changed files with 354 additions and 151 deletions
+2
View File
@@ -66,6 +66,8 @@ impl<T: Operation> KeyedItem for T {
}
impl Summary for OperationSummary {
type Context = ();
fn add_summary(&mut self, other: &Self) {
assert!(self.key < other.key);
self.key = other.key;