Matrix<T>.AggregateColumnsBy Method

Definition

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

Overload List

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

AggregateColumnsBy(IGrouping, TypePreservingAggregatorGroup)

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

Parameters

grouping  IGrouping
The grouping object.
aggregator  TypePreservingAggregatorGroup
The aggregator to apply to each group.

Return Value

Matrix<T>
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<TResult>(IGrouping, AggregatorGroup<TResult>)

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

Parameters

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

Type Parameters

TResult
The type of the result of the aggregator.

Return Value

Matrix<TResult>
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, TResult>(IList<K>, AggregatorGroup<TResult>)

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

Parameters

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

Type Parameters

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

Return Value

Matrix<TResult>
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