Skip to main content

Module sums

Module sums 

Source
Expand description

A sequence in key order that knows the summary of every prefix in log time: a treap whose every node holds the summary of its subtree. What a run keeps its children’s sizes in, so a child’s change of size, an insert before the first of 100,000 or a search for the child at a place along the run costs log time, and moves no sibling.

Structs§

Sums
Items by key, each prefix’s summary in log time.

Traits§

Item
An item of a Sums and what it adds up to by itself.
Summary
What a stretch of items adds up to: then is the stretch followed by next, and Default is the empty stretch.