Grouping<TKey>.Aggregate Into Method
Definition
Namespace: Numerics.NET.DataAnalysis
Assembly: Numerics.NET (in Numerics.NET.dll) Version: 9.0.3
Assembly: Numerics.NET (in Numerics.NET.dll) Version: 9.0.3
Overload List
Aggregate | Aggregates the specified vector over each group and returns the result. |
Aggregate | Aggregates the specified vector over each group and returns the result. |
Aggregate | Aggregates the specified vector over each group and returns the result. |
Aggregate | Aggregates the specified vector over each group and returns the result. |
AggregateInto<T, TResult>(Vector<T>, Aggregator<T, TResult>, Vector<TResult>)
Aggregates the specified vector over each group and returns the result.
public Vector<TResult> AggregateInto<T, TResult>(
Vector<T> values,
Aggregator<T, TResult> aggregator,
Vector<TResult>? result
)
Parameters
- values Vector<T>
- A vector.
- aggregator Aggregator<T, TResult>
- The aggregator to apply to each group.
- result Vector<TResult>
- The vector that is to hold the result of the aggregation. 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>Implements
IGrouping.AggregateInto<T, TResult>(Vector<T>, Aggregator<T, TResult>, Vector<TResult>)Exceptions
Argument | values is null. -or- aggregator is null. |
Dimension | The length of result is less than the number of groups. |
AggregateInto<T1, T2, TResult>(Vector<T1>, Vector<T2>, BinaryAggregator<T1, T2, TResult>, Vector<TResult>)
Aggregates the specified vector over each group and returns the result.
public virtual 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 of values.
- values2 Vector<T2>
- A vector of values.
- aggregator BinaryAggregator<T1, T2, TResult>
- The aggregator to apply to each group.
- result Vector<TResult>
- The vector that is to hold the result of the aggregation. May be null.
Type Parameters
- T1
- The element type of the input vector.
- T2
- The element type of the second vector.
- TResult
- The type of the result of the aggregation.
Return Value
Vector<TResult>Implements
IGrouping.AggregateInto<T1, T2, TResult>(Vector<T1>, Vector<T2>, BinaryAggregator<T1, T2, TResult>, Vector<TResult>)Exceptions
Argument | values1 is null. -or- values2 is null. -or- aggregator is null. |
Dimension | The length of result is less than the number of groups. |
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.
public virtual 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 of the aggregation. May be null.
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>)Exceptions
Argument | values is null. -or- aggregator is null. |
Dimension | The length of result is less than the number of groups. |
AggregateInto<T, TResult, TPredicate>(Aggregator<T, TResult>, Int32, ReadOnlySpanSlice<T>, TPredicate, Boolean, SpanSlice<TResult>)
Aggregates the specified vector over each group and returns the result.
public virtual void AggregateInto<T, TResult, TPredicate>(
Aggregator<T, TResult> aggregator,
int length,
ReadOnlySpanSlice<T> values,
TPredicate predicate,
bool skipMissingValues,
SpanSlice<TResult> result
)
where TPredicate : struct, new(), IFastFunc<T, bool>
Parameters
- aggregator Aggregator<T, TResult>
- The aggregator to apply to each group.
- length Int32
- The number of elements in the input.
- values ReadOnlySpanSlice<T>
- 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
- T
- The element type of the input vector.
- TResult
- The type of the result of the aggregation.
- TPredicate
- The type of predicate.