Groups the elements of a vector according to the specified key selector function.
Namespace:
Extreme.DataAnalysis.Linq
Assembly:
Extreme.Numerics (in Extreme.Numerics.dll) Version: 8.1.1
public static LinqExtensionsLookup<TKey, T> GroupBy<T, TKey>(
this Vector<T> vector,
Func<T, TKey> keySelector
)
<ExtensionAttribute>
Public Shared Function GroupBy(Of T, TKey) (
vector As Vector(Of T),
keySelector As Func(Of T, TKey)
) As LinqExtensionsLookup(Of TKey, T)
public:
[ExtensionAttribute]
generic<typename T, typename TKey>
static LinqExtensionsLookup<TKey, T>^ GroupBy(
Vector<T>^ vector,
Func<T, TKey>^ keySelector
)
[<ExtensionAttribute>]
static member GroupBy :
vector : Vector<'T> *
keySelector : Func<'T, 'TKey> -> LinqExtensionsLookup<'TKey, 'T>
Parameters
- vector
- Type: Extreme.MathematicsVectorT
The vector whose elements to group. - keySelector
- Type: SystemFuncT, 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
Type:
LinqExtensionsLookupTKey,
TUsage Note
In Visual Basic and C#, you can call this method as an instance method on any object of type
VectorT. 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).
Reference