[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.DifferentialDataflow
Assembly: Microsoft.Research.Naiad.DifferentialDataflow (in Microsoft.Research.Naiad.DifferentialDataflow.dll) Version: 0.5.0.0 (0.5.0.0)
Syntax
C#
Collection<TRecord, TTime> Max<TKey, TComparable, TValue>( Expression<Func<TRecord, TKey>> keySelector, Expression<Func<TRecord, TValue>> valueSelector, Expression<Func<TKey, TValue, TComparable>> comparableSelector, Expression<Func<TKey, TValue, TRecord>> resultSelector ) where TKey : Object, IEquatable<TKey> where TComparable : Object, IComparable<TComparable> where TValue : Object, IEquatable<TValue>
Parameters
- keySelector
- Type: System.Linq.Expressions.Expression<Func<TRecord, TKey>>
Function that extracts a key from each record. - valueSelector
- Type: System.Linq.Expressions.Expression<Func<TRecord, TValue>>
Function that transforms a record to the intermediate value that is stored for each record. - comparableSelector
- Type: System.Linq.Expressions.Expression<Func<TKey, TValue, TComparable>>
Function that extracts the portion of a key-value pair to be used in the comparison. - resultSelector
- Type: System.Linq.Expressions.Expression<Func<TKey, TValue, TRecord>>
Function that transforms a key and the maximum value to an output record.
Type Parameters
- TKey
- The key type.
- TComparable
- The type of values to be used for comparison.
- TValue
- The intermediate value type.
Return Value
Type: Collection<TRecord, TTime>The collection of output records.
See Also