Struct differential_dataflow::collection::compact::Compact [] [src]

pub struct Compact<K, V> {
    pub keys: Vec<K>,
    pub cnts: Vec<u32>,
    pub vals: Vec<(V, i32)>,
}

A compressed representation of the accumulation of (key, val, wgt) triples.

Fields

An ordered list of the distinct keys.

Counts for each key indicating the number of corresponding values in self.vals.

The list is maintained separately in the interest of eventually having run-length coding treat non-repetitions better.

A list of values, ordered within each key group.

Methods

impl<K: Ord + Debug, V: Ord> Compact<K, V>
[src]

Constructs a new Compact with indicated initial capacities.

Most operations with Compact eventually shrink the amount of memory to fit whatever they have used, so the main concern here is to avoid grossly over-allocating. Typically, these structs are created in a transient compaction step and not maintained open, meaning we can afford to be a bit sloppy.

Reports the size in bytes, used elsewhere to determine how much space we should use for buffering uncompressed elements.

Populates the Compact from an iterator of ordered (key, val, wgt) triples.

The Compact does not know about the ordering, only that it should look for repetitions of in the sequences of key and wgt.

Extends the compact collection by a set of key-value updates.

Extends the compact collection from the result of a timely_sort radix sorter.

Creates a new session for introducing one key's worth of values.

Pushes updates for a key from a supplied iterator.

Trait Implementations

impl<K: Debug, V: Debug> Debug for Compact<K, V>
[src]

Formats the value using the given formatter.

impl<K: Clone, V: Clone> Clone for Compact<K, V>
[src]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more