LinqExtensions.GroupBy<T, TKey>(Vector<T>, Func<T, TKey>) Method

Groups the elements of 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#
public static LinqExtensions.Lookup<TKey, T> GroupBy<T, TKey>(
	this Vector<T> vector,
	Func<T, TKey> keySelector
)

Parameters

vector  Vector<T>
The vector whose elements to group.
keySelector  Func<T, TKey>
A function to extract the key from each element.

Type Parameters

T
The type of the elements of the vector.
TKey
The type of the keys.

Return Value

LinqExtensions.Lookup<TKey, T>

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type Vector<T>. 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