Module differential_dataflow::consolidation[][src]

Common logic for the consolidation of vectors of Semigroups.

Often we find ourselves with collections of records with associated weights (often integers) where we want to reduce the collection to the point that each record occurs at most once, with the accumulated weights. These methods supply that functionality.

Importantly, these methods are used internally by differential dataflow, but are made public for the convenience of others. Their precise behavior is driven by the needs of differential dataflow (chiefly: canonicalizing sequences of non-zero updates); should you need specific behavior, it may be best to defensively copy, paste, and maintain the specific behavior you require.

Functions

consolidate

Sorts and consolidates vec.

consolidate_from

Sorts and consolidate vec[offset..].

consolidate_slice

Sorts and consolidates a slice, returning the valid prefix length.

consolidate_updates

Sorts and consolidates vec.

consolidate_updates_from

Sorts and consolidate vec[offset..].

consolidate_updates_slice

Sorts and consolidates a slice, returning the valid prefix length.