Matrix<T>.AggregateColumnsBy Method

Definition

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

Overload List

AggregateColumnsBy<U>(IGrouping, AggregatorGroup<U>) Returns a new matrix that aggregates the columns according to the specified grouping.
AggregateColumnsBy<K, U>(IList<K>, AggregatorGroup<U>) Returns a new matrix that aggregates the columns grouped by the specified vector.

AggregateColumnsBy<U>(IGrouping, AggregatorGroup<U>)

Returns a new matrix that aggregates the columns according to the specified grouping.
C#
public Matrix<U> AggregateColumnsBy<U>(
	IGrouping grouping,
	AggregatorGroup<U> aggregator
)

Parameters

grouping  IGrouping
The grouping object.
aggregator  AggregatorGroup<U>
The aggregator to apply to each group.

Type Parameters

U
The type of the result of the aggregator.

Return Value

Matrix<U>
A new matrix, with rows indexed by the index associated with grouping, and as values the result of applying aggregator to each group of each column.

AggregateColumnsBy<K, U>(IList<K>, AggregatorGroup<U>)

Returns a new matrix that aggregates the columns grouped by the specified vector.
C#
public Matrix<U> AggregateColumnsBy<K, U>(
	IList<K> groupingVector,
	AggregatorGroup<U> aggregator
)

Parameters

groupingVector  IList<K>
The vector that contains the group memberships.
aggregator  AggregatorGroup<U>
The aggregator to apply to each group.

Type Parameters

K
The element type of the grouping vector.
U
The type of the result of the aggregator.

Return Value

Matrix<U>
A new matrix, with rows indexed by the unique elements of groupingVector, and as values the result of applying aggregator to each group of each column.

See Also