Sliding Window Aggregation
Deque-based data structure that holds the product of semi-group operations.
__init__
Arguments
dot: Callable[[T, T], T]: binary operator corresponding to the semi-group operator.
__getitem__
Returns the i-th element of the deque.
Arguments
i: int: index
Returns
T: value at indexi
Complexities
append
Appends a value to the right end of the deque.
Arguments
val: T: value to append
Complexities
appendleft
Appends a value to the left end of the deque.
Arguments
val: T: value to append
Complexities
pop
Removes the rightmost element of the deque.
Returns
T: value at the rightmost element
Complexities
popleft
Removes the leftmost element of the deque.
Returns
T: value at the leftmost element
Complexities
prod
Returns the product of all elements in the deque.
Returns
T: product of all elements
