[This is preliminary documentation and is subject to change.]
The Differential Dataflow framework contains extension methods that support LINQ-style incremental and iterative operators.
Classes
Class | Description | |
---|---|---|
ExtensionMethods |
Extension methods for Differential Dataflow CollectionTRecord, TTime objects
and related types.
| |
InputCollectionExtensionMethods |
Extension methods
|
Structures
Structure | Description | |
---|---|---|
IntPair |
An equatable pair of integers
| |
WeightedTRecord |
A record with a signed 64-bit weight, which corresponds to the multiplicity of the record
in a multiset.
|
Interfaces
Interface | Description | |
---|---|---|
CollectionTRecord, TTime |
A collection is a multiset of records that varies according to a logical timestamp.
| |
InputCollectionTRecord |
A CollectionTRecord, TTime that can be modified by adding or removing records.
|
Remarks
Examples
using Microsoft.Research.Naiad; using Microsoft.Research.Naiad.Frameworks.DifferentialDataflow; class Program { public static void Main(string[] args) { using (Controller controller = NewController.FromArgs(ref args) { using (Computation computation = controller.NewComputation()) { // Define a computation in terms of collections. InputCollection<int> input = computation.NewInputCollection(); var histogram = input.Count(x => x); // A subscription collects the result of the computation, and applies // an action to the array of weighted updates. Subscription subscription = histogram.Subscribe(changes => { /* ... */ }); computation.Activate(); // The OnNext() method takes an IEnumerable<int> that specifies records to add. input.OnNext(new int[] { 1, 1, 2, 3, 5, 8 }); input.Sync(0); input.OnNext(new int[] { 13 }); input.Sync(1); // This OnNext() overload allows elements to be added with integer weights. // The weights may be positive (adding records) or negative (removing records). input.OnNext(new Weighted<int>[] { new Weighted<int>(1, -2) }); input.Sync(2); computation.Join(); } controller.Join(); } } }
See Also