CollectionTRecord, TTimeSumTKey, TOutput Method (ExpressionFuncTRecord, TKey, ExpressionFuncTRecord, Single, ExpressionFuncTKey, Single, TOutput)Naiad Help

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

Groups records using the supplied key selector, and computes the sum of the records in each group.

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> Sum<TKey, TOutput>(
	Expression<Func<TRecord, TKey>> keySelector,
	Expression<Func<TRecord, float>> valueSelector,
	Expression<Func<TKey, float, TOutput>> resultSelector
)
where TKey : Object, IEquatable<TKey>
where TOutput : Object, IEquatable<TOutput>

Parameters

keySelector
Type: System.Linq.ExpressionsExpressionFuncTRecord, TKey
Function that extracts a key from each record.
valueSelector
Type: System.Linq.ExpressionsExpressionFuncTRecord, Single
Function that extracts the floating-point value to be summed each record.
resultSelector
Type: System.Linq.ExpressionsExpressionFuncTKey, Single, TOutput
Function that transforms a key and count to an output record.

Type Parameters

TKey
The key type.
TOutput
The output type.

Return Value

Type: CollectionTOutput, TTime
The collection of output records.
See Also

Reference