CollectionTRecord, TTimeCoGroupByTKey, TRecord2, TOutput Method (CollectionTRecord2, TTime, ExpressionFuncTRecord, TKey, ExpressionFuncTRecord2, TKey, ExpressionFuncTKey, IEnumerableTRecord, IEnumerableTRecord2, IEnumerableTOutput)Naiad Help

[This is preliminary documentation and is subject to change.]

Groups records from both input collections using the respective key selector, and applies the given reduction function.

Namespace: Microsoft.Research.Naiad.Frameworks.DifferentialDataflow
Assembly: Microsoft.Research.Naiad.DifferentialDataflow (in Microsoft.Research.Naiad.DifferentialDataflow.dll) Version: 0.5.0.0 (0.5.0.0)
Syntax

C#
Collection<TOutput, TTime> CoGroupBy<TKey, TRecord2, TOutput>(
	Collection<TRecord2, TTime> other,
	Expression<Func<TRecord, TKey>> keySelector1,
	Expression<Func<TRecord2, TKey>> keySelector2,
	Expression<Func<TKey, IEnumerable<TRecord>, IEnumerable<TRecord2>, IEnumerable<TOutput>>> reducer
)
where TKey : Object, IEquatable<TKey>
where TRecord2 : Object, IEquatable<TRecord2>
where TOutput : Object, IEquatable<TOutput>

Parameters

other
Type: Microsoft.Research.Naiad.Frameworks.DifferentialDataflowCollectionTRecord2, TTime
The other collection.
keySelector1
Type: System.Linq.ExpressionsExpressionFuncTRecord, TKey
The key selector applied to records in this collection.
keySelector2
Type: System.Linq.ExpressionsExpressionFuncTRecord2, TKey
The key selector applied to records in the other collection.
reducer
Type: System.Linq.ExpressionsExpressionFuncTKey, IEnumerableTRecord, IEnumerableTRecord2, IEnumerableTOutput
Function that transforms two sequences of records from each input collection to a sequence of output records.

Type Parameters

TKey
The key type.
TRecord2
The type of records in the other collection.
TOutput
The result type.

Return Value

Type: CollectionTOutput, TTime
The collection of output records for each group in either input collection.
Remarks

The CoGroupByTKey, TValue1, TValue2, TRecord2, TOutput(CollectionTRecord2, TTime, ExpressionFuncTRecord, TKey, ExpressionFuncTRecord2, TKey, ExpressionFuncTRecord, TValue1, ExpressionFuncTRecord2, TValue2, ExpressionFuncTKey, IEnumerableTValue1, IEnumerableTValue2, IEnumerableTOutput) overload can reduce the amount of storage required compared to this overload in cases where the intermediate values are small relative to each original record. The CoGroupByTKey, TRecord2, TOutput(CollectionTRecord2, TTime, ExpressionFuncTRecord, TKey, ExpressionFuncTRecord2, TKey, ExpressionFuncTKey, IEnumerableWeightedTRecord, IEnumerableWeightedTRecord2, IEnumerableWeightedTOutput) overload can reduce the amount of computation required compared to this overload, by compressing multiple instances of the same value into a single WeightedTRecord value.
See Also

Reference