Trait differential_dataflow::difference::Diff [] [src]

pub trait Diff: Add<Self, Output = Self> + Sub<Self, Output = Self> + Neg<Output = Self> + Sized + Data + Copy {
    fn is_zero(&self) -> bool;
fn zero() -> Self; }

A type that can be treated as a difference.

The mathematical requirements are, I believe, an Abelian group, in that we require addition, inverses, and almost certainly use commutativity somewhere (it isn't clear if it is a requirement, as it isn't clear that there are semantics other than "we accumulate your differences"; I suspect we don't always accumulate them in the right order, so commutativity is important until we conclude otherwise).

Required Methods

Returns true if the element is the additive identity.

This is primarily used by differential dataflow to know when it is safe to delete and update. When a difference accumulates to zero, the difference has no effect on any accumulation and can be removed.

The additive identity.

This method is primarily used by differential dataflow internals as part of consolidation, when one value is accumulated elsewhere and must be replaced by valid but harmless value.

Implementations on Foreign Types

impl Diff for isize
[src]

[src]

[src]

impl Diff for i64
[src]

[src]

[src]

impl Diff for i32
[src]

[src]

[src]

Implementors