CollectionTRecord, TTimeSumTKey, TOutput Method (ExpressionFuncTRecord, TKey, ExpressionFuncTRecord, Double, ExpressionFuncTKey, Double, 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, double>> valueSelector,
	Expression<Func<TKey, double, 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, Double
Function that extracts the 64-bit floating-point value to be summed each record.
resultSelector
Type: System.Linq.ExpressionsExpressionFuncTKey, Double, 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