Applies the specified aggregation function to the values
in each row grouped by the specified grouping row.
Namespace:
Extreme.Mathematics
Assembly:
Extreme.Numerics (in Extreme.Numerics.dll) Version: 8.1.1
public Matrix<U> AggregateRowsBy<R, U>(
R groupingRowKey,
Func<Vector<T>, U> aggregator
)
Public Function AggregateRowsBy(Of R, U) (
groupingRowKey As R,
aggregator As Func(Of Vector(Of T), U)
) As Matrix(Of U)
public:
generic<typename R, typename U>
Matrix<U>^ AggregateRowsBy(
R groupingRowKey,
Func<Vector<T>^, U>^ aggregator
)
member AggregateRowsBy :
groupingRowKey : 'R *
aggregator : Func<Vector<'T>, 'U> -> Matrix<'U>
Parameters
- groupingRowKey
- Type: R
The key of the grouping row. - aggregator
- Type: SystemFuncVectorT, U
A function that transforms a vector of type T
to a value of type U.
Type Parameters
- R
- The element type of the row index of the matrix.
- U
- The type of the result of the aggregation.
Return Value
Type:
MatrixUA new matrix with columns indexed by the unique elements of
row
groupingRowKey and values the result of
aggregator applied to each grouping.
Reference