ExtensionMethodsMaxTInput, TKey, TValue, TTime Method Naiad Help

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

Groups records using the supplied key selector, and computes the maximum value in each group.

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

C#
public static Stream<Pair<TKey, TValue>, TTime> Max<TInput, TKey, TValue, TTime>(
	this Stream<TInput, TTime> stream,
	Func<TInput, TKey> keySelector,
	Func<TInput, TValue> valueSelector
)
where TValue : Object, IComparable<TValue>
where TTime : Object, Time<TTime>

Parameters

stream
Type: Microsoft.Research.NaiadStreamTInput, TTime
The input stream.
keySelector
Type: SystemFuncTInput, TKey
Function that extracts a key from each record.
valueSelector
Type: SystemFuncTInput, TValue
Function that extracts from each record the value to be used in the comparison.

Type Parameters

TInput
The type of the input records.
TKey
The key type.
TValue
The type of values to be used for comparison.
TTime
The type of timestamp on each record.

Return Value

Type: StreamPairTKey, TValue, TTime
The stream of one key-value pair for each key and the respective maximum value in the input stream.

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type StreamTInput, TTime. When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).
See Also

Reference