Matrix<T>.AggregateRows Method

DefinitionPermalink

Namespace: Numerics.NET
Assembly: Numerics.NET (in Numerics.NET.dll) Version: 9.1.0

Overload ListPermalink

AggregateRows(TypePreservingAggregatorGroup) Applies the specified aggregator to all the rows in the matrix.
AggregateRows<TResult>(Aggregator<T, TResult>) 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<TResult>(AggregatorGroup<TResult>[]) Applies the specified aggregators to all the rows in the matrix.
AggregateRows<TResult>(Func<Vector<T>, TResult>) Applies the specified aggregators to all the rows in the matrix.

AggregateRows<TResult>(Aggregator<T, TResult>)Permalink

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

Parameters

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

Type Parameters

TResult
The type of the result of the aggregation.

Return Value

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

AggregateRows<U>(AggregatorGroup<U>)Permalink

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<TResult>(AggregatorGroup<TResult>[])Permalink

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

Parameters

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

Type Parameters

TResult
The type of the result of the aggregation.

Return Value

Matrix<TResult>
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<TResult>(Func<Vector<T>, TResult>)Permalink

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

Parameters

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

Type Parameters

TResult
The type of the result of the aggregation.

Return Value

Vector<TResult>
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(TypePreservingAggregatorGroup)Permalink

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

Parameters

aggregator  TypePreservingAggregatorGroup
The aggregator to use.

Return Value

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

See AlsoPermalink