Skip to content

Running state [mp]

Micro pattern

Description

Update a compact summary after each item so it describes the processed prefix, window, or boundary.

Problems

Running optimum

Maintain an extendable state and the best result observed.

Running window

Track validity and the best size of an active interval.

Prefix and suffix aggregate

Carry an aggregate through a directional pass.

Boundary maxima

Maintain the strongest observed boundary on each active side.

Streaming parser state

Retain the current token, pending operator, and completed aggregate.

Dynamic states

Update a fixed collection of semantic states as input arrives.