impure functionpush

Store an element on the sliding window buffer and remove elements that are older as the window length

Inputs

TypeNameDefaultDescription
BufferbufferMemory of sliding window
RealtTime instant of v to be stored in buffer
BooleanbfalseValue b at time instant t to be stored in buffer

Outputs

TypeNameDefaultDescription
BuffernewBufferUpdated memory of sliding window