Matrix<T>.AggregateRowsBy<C, U>(C, AggregatorGroup<U>) Method

Returns a new matrix that aggregates the rows grouped by the specified row.

Definition

Namespace: Extreme.Mathematics
Assembly: Extreme.Numerics (in Extreme.Numerics.dll) Version: 8.1.23
C#
public Matrix<U> AggregateRowsBy<C, U>(
	C groupingRowKey,
	AggregatorGroup<U> aggregator
)

Parameters

groupingRowKey  C
The key of the grouping row.
aggregator  AggregatorGroup<U>
The aggregator to apply to each group.

Type Parameters

C
The type of the row keys.
U
The type of the result of the aggregator.

Return Value

Matrix<U>
A new matrix, with columns indexed by the unique elements of the row with key groupingRowKey, and values the result of applying aggregator to each group of the remaining rows.

See Also