private EventSet window(EventSet e1, int offset, int windowSize) { return e1.subset(offset, offset + windowSize); }