Pivot.AggregateInto Method

Definition

Namespace: Numerics.NET.DataAnalysis
Assembly: Numerics.NET (in Numerics.NET.dll) Version: 9.1.2

Overload List

AggregateInto<T, TResult>(Vector<T>, Aggregator<T, TResult>, Vector<TResult>) Applies the specified aggregator to the elements of a vector according to the current grouping.
AggregateInto<T1, T2, TResult>(Vector<T1>, Vector<T2>, BinaryAggregator<T1, T2, TResult>, Vector<TResult>) Applies the specified aggregator to the elements of a vector according to the current grouping.
AggregateInto<T, TResult, TPredicate>(Vector<T>, Aggregator<T, TResult>, TPredicate, Nullable<Boolean>, Vector<TResult>) Aggregates the specified vector over each group and returns the result.
AggregateInto<TInput, TResult, TPredicate>(Aggregator<TInput, TResult>, Int32, ReadOnlySpanSlice<TInput>, TPredicate, Boolean, SpanSlice<TResult>) Aggregates the specified vector over each group and returns the result.

AggregateInto<T, TResult>(Vector<T>, Aggregator<T, TResult>, Vector<TResult>)

Applies the specified aggregator to the elements of a vector according to the current grouping.
C#
public Vector<TResult> AggregateInto<T, TResult>(
	Vector<T> values,
	Aggregator<T, TResult> aggregator,
	Vector<TResult>? result
)

Parameters

values  Vector<T>
A vector that contains the values to be aggregated.
aggregator  Aggregator<T, TResult>
An aggregator object.
result  Vector<TResult>
A vector that is to hold the result. May be null.

Type Parameters

T
The element type of the input vector.
TResult
The type of the result of the aggregation.

Return Value

Vector<TResult>
A vector containing the aggregated values indexed by the grouping's index.

Implements

IGrouping.AggregateInto<T, TResult>(Vector<T>, Aggregator<T, TResult>, Vector<TResult>)

AggregateInto<T1, T2, TResult>(Vector<T1>, Vector<T2>, BinaryAggregator<T1, T2, TResult>, Vector<TResult>)

Applies the specified aggregator to the elements of a vector according to the current grouping.
C#
public Vector<TResult> AggregateInto<T1, T2, TResult>(
	Vector<T1> values1,
	Vector<T2> values2,
	BinaryAggregator<T1, T2, TResult> aggregator,
	Vector<TResult>? result
)

Parameters

values1  Vector<T1>
A vector that contains the values to be aggregated.
values2  Vector<T2>
A vector that contains the values to be aggregated.
aggregator  BinaryAggregator<T1, T2, TResult>
An aggregator object.
result  Vector<TResult>
A vector that is to hold the result. May be null.

Type Parameters

T1
The element type of the first input vector.
T2
The element type of the second input vector.
TResult
The type of the result of the aggregation.

Return Value

Vector<TResult>
A vector containing the aggregated values indexed by the grouping's index.

Implements

IGrouping.AggregateInto<T1, T2, TResult>(Vector<T1>, Vector<T2>, BinaryAggregator<T1, T2, TResult>, Vector<TResult>)

AggregateInto<T, TResult, TPredicate>(Vector<T>, Aggregator<T, TResult>, TPredicate, Nullable<Boolean>, Vector<TResult>)

Aggregates the specified vector over each group and returns the result.
C#
public Vector<TResult> AggregateInto<T, TResult, TPredicate>(
	Vector<T> values,
	Aggregator<T, TResult> aggregator,
	TPredicate predicate,
	bool? skipMissingValues,
	Vector<TResult>? result
)
where TPredicate : struct, new(), IFastFunc<T, bool>

Parameters

values  Vector<T>
A vector.
aggregator  Aggregator<T, TResult>
The aggregator to apply to each group.
predicate  TPredicate
A predicate that filters the values that are to be included in the aggregation.
skipMissingValues  Nullable<Boolean>
Specifies whether missing values should be excluded from the aggregation. If null, then the value is inferred from values.
result  Vector<TResult>
The vector that is to hold the result.

Type Parameters

T
The element type of the input vector.
TResult
The type of the result of the aggregation.
TPredicate
The type of predicate.

Return Value

Vector<TResult>

Implements

IGrouping.AggregateInto<T, TResult, TPredicate>(Vector<T>, Aggregator<T, TResult>, TPredicate, Nullable<Boolean>, Vector<TResult>)

AggregateInto<TInput, TResult, TPredicate>(Aggregator<TInput, TResult>, Int32, ReadOnlySpanSlice<TInput>, TPredicate, Boolean, SpanSlice<TResult>)

Aggregates the specified vector over each group and returns the result.
C#
public virtual void AggregateInto<TInput, TResult, TPredicate>(
	Aggregator<TInput, TResult> aggregator,
	int length,
	ReadOnlySpanSlice<TInput> values,
	TPredicate predicate,
	bool skipMissingValues,
	SpanSlice<TResult> result
)
where TPredicate : struct, new(), IFastFunc<TInput, bool>

Parameters

aggregator  Aggregator<TInput, TResult>
The aggregator to apply to each group.
length  Int32
The number of elements in the input.
values  ReadOnlySpanSlice<TInput>
A span slice that contains the values to aggregate.
predicate  TPredicate
A predicate that filters the values that are to be included in the aggregation.
skipMissingValues  Boolean
Optional. Specifies whether missing values should be excluded from the aggregation. The default is false.
result  SpanSlice<TResult>
The vector that is to hold the result.

Type Parameters

TInput
TResult
The type of the result of the aggregation.
TPredicate
The type of predicate.

Implements

IGrouping.AggregateInto<T, TResult, TPredicate>(Aggregator<T, TResult>, Int32, ReadOnlySpanSlice<T>, TPredicate, Boolean, SpanSlice<TResult>)

See Also