Linq Extensions.To Lookup<T, TKey>(Vector<T>, Func<T, TKey>) Method
Creates a lookup from a vector according to the specified key selector function.
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> ToLookup<T, TKey>(
this Vector<T> vector,
Func<T, TKey> keySelector
)
Parameters
- vector Vector<T>
- The vector to create a lookup from.
- keySelector Func<T, TKey>
- A function to extract a key from each element.
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.