pub fn consolidate_updates<D: Ord, T: Ord, R: Semigroup>(
    vec: &mut Vec<(D, T, R)>
Expand description

Sorts and consolidates vec.

This method will sort vec and then consolidate runs of more than one entry with identical first two elements by accumulating the third elements of the triples. Should the final accumulation be zero, the element is discarded.