(
self,
mut logic: L,
)
| 382 | } |
| 383 | |
| 384 | fn explode_one<D2, R2, L>( |
| 385 | self, |
| 386 | mut logic: L, |
| 387 | ) -> VecCollection<'scope, T, D2, <R2 as Multiply<R>>::Output> |
| 388 | where |
| 389 | D2: differential_dataflow::Data, |
| 390 | R2: Semigroup + Multiply<R>, |
| 391 | <R2 as Multiply<R>>::Output: Clone + 'static + Semigroup, |
| 392 | L: FnMut(D1) -> (D2, R2) + 'static, |
| 393 | T: Lattice, |
| 394 | { |
| 395 | self.inner |
| 396 | .clone() |
| 397 | .unary::<ConsolidatingContainerBuilder<_>, _, _, _>( |
| 398 | Pipeline, |
| 399 | "ExplodeOne", |
| 400 | move |_, _| { |
| 401 | move |input, output| { |
| 402 | input.for_each(|time, data| { |
| 403 | output |
| 404 | .session_with_builder(&time) |
| 405 | .give_iterator(data.drain(..).map(|(x, t, d)| { |
| 406 | let (x, d2) = logic(x); |
| 407 | (x, t, d2.multiply(&d)) |
| 408 | })); |
| 409 | }); |
| 410 | } |
| 411 | }, |
| 412 | ) |
| 413 | .as_collection() |
| 414 | } |
| 415 | |
| 416 | fn ensure_monotonic<E, IE>( |
| 417 | self, |
no test coverage detected