Fixed window

A state to represent a window with a fixed capacity. It will start off empty, can have values pushed into it, and can be tested to see if it is "full".

AssociativeWindowAggregation.FixedWindowAssociativeOpType
FixedWindowAssociativeOp{T,Op,Op!}(window)
FixedWindowAssociativeOp{T,Op}(window)

State necessary for accumulation over a rolling window of fixed size.

Fields

  • window_state::WindowedAssociativeOp{T,Op}: The underlying general-window state.
  • remaining_window::Int: How much of the window remains to be filled. Initially this will be set to the window size, and will then reduce for every value added until it reaches zero.
source
AssociativeWindowAggregation.update_state!Method
update_state!(state::FixedWindowAssociativeOp, value) -> state

Add the specified value to the state. Drop a value from the window iff the window is full.

Returns

  • ::FixedWindowAssociativeOp: The instance state that was passed in.
source