Grouping.Group Method

Definition

Namespace: Extreme.DataAnalysis
Assembly: Extreme.Numerics (in Extreme.Numerics.dll) Version: 8.1.23

Overload List

Group<T>(IEnumerable<T>) Returns a grouping by the unique elements in a sequence.
Group<T>(IList<T>) Returns a grouping by the unique elements in a list.
Group<T>(IEnumerable<T>, IEqualityComparer<T>) Returns a grouping by the unique elements in a sequence using the specified comparer to determine equality.
Group<T>(IList<T>, IEqualityComparer<T>) Returns a grouping by the unique elements in a list using the specified comparer to determine equality.

Group<T>(IEnumerable<T>)

Returns a grouping by the unique elements in a sequence.
C#
public static Grouping<T> Group<T>(
	this IEnumerable<T> keys
)

Parameters

keys  IEnumerable<T>
A list.

Type Parameters

T
The type of the elements of the sequence.

Return Value

Grouping<T>
A grouping of the elements of keys and indexed by the unique elements in keys.

Usage Note

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

Group<T>(IList<T>)

Returns a grouping by the unique elements in a list.
C#
public static Grouping<T> Group<T>(
	this IList<T> keys
)

Parameters

keys  IList<T>
A list.

Type Parameters

T
The type of the elements of the list.

Return Value

Grouping<T>
A grouping of the elements of keys and indexed by the unique elements in keys.

Usage Note

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

Group<T>(IEnumerable<T>, IEqualityComparer<T>)

Returns a grouping by the unique elements in a sequence using the specified comparer to determine equality.
C#
public static Grouping<T> Group<T>(
	this IEnumerable<T> keys,
	IEqualityComparer<T> comparer
)

Parameters

keys  IEnumerable<T>
A list.
comparer  IEqualityComparer<T>
The comparer used to determine whether two keys are equal.

Type Parameters

T
The type of the elements of the sequence.

Return Value

Grouping<T>
A grouping of the elements of keys and indexed by the unique elements in keys.

Usage Note

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

Group<T>(IList<T>, IEqualityComparer<T>)

Returns a grouping by the unique elements in a list using the specified comparer to determine equality.
C#
public static Grouping<T> Group<T>(
	this IList<T> keys,
	IEqualityComparer<T> comparer
)

Parameters

keys  IList<T>
A list.
comparer  IEqualityComparer<T>
The comparer used to determine whether two keys are equal.

Type Parameters

T
The type of the elements of the list.

Return Value

Grouping<T>
A grouping of the elements of keys and indexed by the unique elements in keys.

Usage Note

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