[][src]Struct differential_dataflow::trace::implementations::spine_fueled_neu::Spine

pub struct Spine<K, V, T: Lattice + Ord, R: Semigroup, B: Batch<K, V, T, R>> { /* fields omitted */ }

An append-only collection of update tuples.

A spine maintains a small number of immutable collections of update tuples, merging the collections when two have similar sizes. In this way, it allows the addition of more tuples, which may then be merged with other immutable collections.

Methods

impl<K, V, T, R, B> Spine<K, V, T, R, B> where
    K: Ord + Clone,
    V: Ord + Clone,
    T: Lattice + Ord + Clone + Debug + Default,
    R: Semigroup,
    B: Batch<K, V, T, R>, 
[src]

pub fn with_effort(
    effort: usize,
    operator: OperatorInfo,
    logger: Option<Logger>,
    activator: Option<Activator>
) -> Self
[src]

Allocates a fueled Spine with a specified effort multiplier.

This trace will merge batches progressively, with each inserted batch applying a multiple of the batch's length in effort to each merge. The effort parameter is that multiplier. This value should be at least one for the merging to happen; a value of zero is not helpful.

pub fn introduce_batch(&mut self, batch: Option<B>, batch_index: usize)[src]

Introduces a batch at an indicated level.

The level indication is often related to the size of the batch, but it can also be used to artificially fuel the computation by supplying empty batches at non-trivial indices, to move merges along.

pub fn apply_fuel(&mut self, fuel: &mut isize)[src]

Applies an amount of fuel to merges in progress.

The supplied fuel is for each in progress merge, and if we want to spend the fuel non-uniformly (e.g. prioritizing merges at low layers) we could do so in order to maintain fewer batches on average (at the risk of completing merges of large batches later, but tbh probably not much later).

Trait Implementations

impl<K, V, T, R, B> TraceReader for Spine<K, V, T, R, B> where
    K: Ord + Clone,
    V: Ord + Clone,
    T: Lattice + Ord + Clone + Debug + Default,
    R: Semigroup,
    B: Batch<K, V, T, R> + Clone + 'static, 
[src]

type Key = K

Key by which updates are indexed.

type Val = V

Values associated with keys.

type Time = T

Timestamps associated with updates

type R = R

Associated update.

type Batch = B

The type of an immutable collection of updates.

type Cursor = CursorList<K, V, T, R, <B as BatchReader<K, V, T, R>>::Cursor>

The type used to enumerate the collections contents.

impl<K, V, T, R, B> Trace for Spine<K, V, T, R, B> where
    K: Ord + Clone,
    V: Ord + Clone,
    T: Lattice + Ord + Clone + Debug + Default,
    R: Semigroup,
    B: Batch<K, V, T, R> + Clone + 'static, 
[src]

fn exert(&mut self, effort: &mut isize)[src]

Apply some amount of effort to trace maintenance.

The units of effort are updates, and the method should be thought of as analogous to inserting as many empty updates, where the trace is permitted to perform proportionate work.

fn close(&mut self)[src]

Completes the trace with a final empty batch.

Auto Trait Implementations

impl<K, V, T, R, B> !Send for Spine<K, V, T, R, B>

impl<K, V, T, R, B> !Sync for Spine<K, V, T, R, B>

impl<K, V, T, R, B> Unpin for Spine<K, V, T, R, B> where
    B: Unpin,
    K: Unpin,
    R: Unpin,
    T: Unpin,
    V: Unpin,
    <B as Batch<K, V, T, R>>::Merger: Unpin

impl<K, V, T, R, B> !UnwindSafe for Spine<K, V, T, R, B>

impl<K, V, T, R, B> !RefUnwindSafe for Spine<K, V, T, R, B>

Blanket Implementations

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> From<T> for T[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]