Matrix<T>.AggregateRows Method

Definition

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

Overload List

AggregateRows<U>(Aggregator<T, U>) Applies the specified aggregator to all the rows in the matrix.
AggregateRows<U>(AggregatorGroup<U>) Applies the specified aggregator to all the rows in the matrix.
AggregateRows<U>(AggregatorGroup<U>[]) Applies the specified aggregators to all the rows in the matrix.
AggregateRows<U>(Func<Vector<T>, U>) Applies the specified aggregators to all the rows in the matrix.

AggregateRows<U>(Aggregator<T, U>)

Applies the specified aggregator to all the rows in the matrix.
C#
public Vector<U> AggregateRows<U>(
	Aggregator<T, U> aggregator
)

Parameters

aggregator  Aggregator<T, U>
The aggregator to use.

Type Parameters

U
The type of the result of the aggregation.

Return Value

Vector<U>
A vector that contains the result of the aggregations indexed by the matrix's row index.

AggregateRows<U>(AggregatorGroup<U>)

Applies the specified aggregator to all the rows in the matrix.
C#
public Vector<U> AggregateRows<U>(
	AggregatorGroup<U> aggregator
)

Parameters

aggregator  AggregatorGroup<U>
The aggregator to use.

Type Parameters

U
The type of the result of the aggregation.

Return Value

Vector<U>
A vector that contains the result of the aggregations indexed by the matrix's row index.

AggregateRows<U>(AggregatorGroup<U>[])

Applies the specified aggregators to all the rows in the matrix.
C#
public Matrix<U> AggregateRows<U>(
	params AggregatorGroup<U>[] aggregators
)

Parameters

aggregators  AggregatorGroup<U>[]
One or more aggregators to use.

Type Parameters

U
The type of the result of the aggregation.

Return Value

Matrix<U>
A new matrix that contains the result of the aggregations with columns indexed by the names of the aggregators and rows indexed by the matrix's row index.

AggregateRows<U>(Func<Vector<T>, U>)

Applies the specified aggregators to all the rows in the matrix.
C#
public Vector<U> AggregateRows<U>(
	Func<Vector<T>, U> aggregator
)

Parameters

aggregator  Func<Vector<T>, U>
A function that aggregates the elements of a vector into a value of type U.

Type Parameters

U
The type of the result of the aggregation.

Return Value

Vector<U>
A new matrix that contains the result of the aggregations with columns indexed by the names of the aggregators and rows indexed by the matrix's row index.

See Also