Linq Extensions.Group By<T, TKey>(Vector<T>, Func<T, TKey>, IEquality Comparer<TKey>) Method
Groups the elements of a vector according to the specified
key selector function and key comparer.
Definition
Namespace: Extreme.DataAnalysis.Linq
Assembly: Extreme.Numerics (in Extreme.Numerics.dll) Version: 8.1.23
C#
A lookup that contains keys and values.
Assembly: Extreme.Numerics (in Extreme.Numerics.dll) Version: 8.1.23
public static LinqExtensions.Lookup<TKey, T> GroupBy<T, TKey>(
this Vector<T> vector,
Func<T, TKey> keySelector,
IEqualityComparer<TKey> comparer
)
Parameters
- vector Vector<T>
- The vector to create a lookup from.
- keySelector Func<T, TKey>
- A function to extract a key from each element.
- comparer IEqualityComparer<TKey>
- An object that compares two keys for equality.
Type Parameters
- T
- The type of the elements of the vector.
- TKey
- The type of the key returned by the key selector.
Return Value
LinqExtensions.Lookup<TKey, T>A lookup that contains keys and values.