Skip to content

Grouping [mp]

Micro pattern

Description

Collect values sharing a level, canonical key, or derived property into one container.

Problems

Group by traversal level

Collect the current BFS frontier as a single group.

Group by canonical key

Use a common representation as the grouping key.

Group by frequency

Index the group containing a value by its occurrence count.

Group equal sweep coordinates

Apply all events at a coordinate before measuring its resulting state.

Group by assigned category

Preserve the internal order of each category before emitting categories in a separate order.