Aggregator<T, TResult> Class

Represents a function that aggregates the values in a vector.

Definition

Namespace: Numerics.NET.DataAnalysis
Assembly: Numerics.NET (in Numerics.NET.dll) Version: 9.0.3
C#
public abstract class Aggregator<T, TResult> : IAggregator<TResult>, 
	IAggregator
Inheritance
Object  →  Aggregator<T, TResult>
Derived
Implements
IAggregator, IAggregator<TResult>

Type Parameters

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

Constructors

Aggregator<T, TResult> Constructs a new aggregator.

Properties

EmptyGroupsHaveValue Gets whether the aggregator produces a value for empty groups.
EmptyValue Gets the result of the aggregation when the input is empty.
IsIncremental Gets whether the aggregator operates on individual elements or on the input as a whole.
MissingValuesAffectResult Gets whether the result of the outcome is different if missing values are present in the input but the other values are the same.
OrderingAffectsResult Gets whether the result of the outcome is different if elements are in a different order.
RequiresTemporaryWorkspace Gets whether the aggregator requires O(N) storage during the computation.
SupportsDirectAggregation Gets whether the aggregator supports computing the aggregation for all groups directly from the group levels.
ZerosAffectResult Gets whether the result of the outcome is different if zero elements are omitted.

Methods

Aggregate(Vector<T>) Aggregates the elements of a vector and returns the result.
Aggregate(IEnumerable<T>, Boolean) Aggregates the elements of a sequence and returns the result.
Aggregate(ReadOnlySpan<T>, Boolean) Aggregates the elements of a vector and returns the result.
Aggregate(Vector<T>, Boolean) Aggregates the elements of a vector and returns the result.
Aggregate(ReadOnlySpan<T>, ReadOnlySpan<Boolean>, Boolean) Aggregates over a span and returns the result.
Aggregate(Int32, ReadOnlySpan<T>, Int32, Boolean) Aggregates the elements of a vector and returns the result.
Aggregate(Vector<T>, Int32, Int32, Nullable<Boolean>) Aggregates the specified range of elements of a vector and returns the result.
Aggregate(Int32, ReadOnlySpan<T>, Int32, ReadOnlySpan<Boolean>, Int32, Boolean) Aggregates over a span and returns the result.
AggregateBy(Vector<T>, IGrouping, Vector<TResult>) Groups the elements of a vector according to the specified grouping.
AggregateBy(Vector<T>, ReadOnlySpan<Int32>, Nullable<Boolean>, Vector<TResult>) Aggregates the elements of a vector according to the specified level indexes.
AggregateBy<TPredicate>(Vector<T>, ReadOnlySpan<Int32>, TPredicate, Nullable<Boolean>, Vector<TResult>) Groups the elements of a vector according to the specified level indexes.
AggregateColumns Aggregates the columns of a matrix.
AggregateColumnsListwise Aggregates the columns of a matrix disregarding the entire row if any of its entries are missing.
AggregateInto(Matrix<T>, Vector<TResult>) Aggregates the columns of a matrix.
Obsolete.
AggregateInto(Vector<T>, IGrouping, Vector<TResult>) Groups the elements of a vector according to the specified grouping.
Obsolete.
AggregateInto(Vector<T>, ReadOnlySpan<Int32>, Nullable<Boolean>, Vector<TResult>) Aggregates the elements of a vector according to the specified level indexes.
Obsolete.
AggregateInto<TPredicate>(Vector<T>, ReadOnlySpan<Int32>, TPredicate, Nullable<Boolean>, Vector<TResult>) Groups the elements of a vector according to the specified level indexes.
Obsolete.
AggregateInto<TPredicate>(Int32, ReadOnlySpan<T>, Int32, ReadOnlySpan<Int32>, Int32, Int32, TPredicate, Boolean, SpanSlice<TResult>) Groups the elements of a vector according to the specified level indexes.
AggregateListwiseInto Aggregates the columns of a matrix disregarding the entire row if any of its entries are missing.
Obsolete.
AggregateWhere(Int32, ReadOnlySpan<T>, Int32, Func<T, Boolean>, Boolean) Aggregates over a span and returns the result.
AggregateWhere<TPredicate>(IEnumerable<T>, TPredicate, Boolean) Aggregates the elements of a sequence and returns the result.
AggregateWhere<TPredicate>(ReadOnlySpan<T>, TPredicate, Boolean) Aggregates the elements of a span and returns the result.
AggregateWhere<TPredicate>(Vector<T>, TPredicate, Nullable<Boolean>) Aggregates the elements of a vector and returns the result.
AggregateWhere<TPredicate>(Int32, ReadOnlySpan<T>, Int32, TPredicate, Boolean) Aggregates the elements of a vector and returns the result.
AggregateWhere<TPredicate>(Vector<T>, Int32, Int32, TPredicate, Nullable<Boolean>) Aggregates the specified range of elements of a vector and returns the result.
AggregateWhere<TPredicate>(Int32, ReadOnlySpan<T>, Int32, ReadOnlySpan<Int32>, TPredicate, Boolean) Aggregates the specified range of elements of a vector and returns the result.
AggregateWhere<T2, TPredicate>(Int32, ReadOnlySpan<T>, Int32, ReadOnlySpan<T2>, Int32, TPredicate, Boolean) Aggregates the elements of a vector and returns the result.
Create<TIntermediate, TAccumulator> Creates an aggregator that converts inputs to an intermediate type before passing them to an accumulator of the specified type to perform the aggregation.
EqualsDetermines whether the specified object is equal to the current object.
(Inherited from Object)
FinalizeAllows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.
(Inherited from Object)
GetHashCodeServes as the default hash function.
(Inherited from Object)
GetTypeGets the Type of the current instance.
(Inherited from Object)
MemberwiseCloneCreates a shallow copy of the current Object.
(Inherited from Object)
ToStringReturns a string that represents the current object.
(Inherited from Object)
TryAggregate(Vector<T>, TResult) Aggregates the elements of a vector and returns the result.
TryAggregate(IEnumerable<T>, Boolean, TResult) Aggregates the elements of a sequence and returns the result.
TryAggregate(ReadOnlySpan<T>, Boolean, TResult) Aggregates the elements of a vector and returns the result.
TryAggregate(Vector<T>, Int32, Int32, TResult) Aggregates the specified range of elements of a vector and returns the result.
TryAggregate(Int32, ReadOnlySpan<T>, Int32, Boolean, TResult) Aggregates the elements of a vector and returns the result.
TryAggregate(Int32, ReadOnlySpan<T>, Int32, ReadOnlySpan<Boolean>, Int32, Boolean, TResult) Aggregates the elements of a vector and returns the result.
TryAggregateWhere(Int32, ReadOnlySpan<T>, Int32, Func<T, Boolean>, Boolean, TResult) Aggregates the elements of a vector and returns the result.
TryAggregateWhere<TPredicate>(IEnumerable<T>, TPredicate, Boolean, TResult) Aggregates the elements of a sequence and returns the result.
TryAggregateWhere<TPredicate>(ReadOnlySpan<T>, TPredicate, Boolean, TResult) Aggregates the elements of a vector and returns the result.
TryAggregateWhere<TPredicate>(Vector<T>, TPredicate, Nullable<Boolean>, TResult) Aggregates the elements of a vector and returns the result.
TryAggregateWhere<TPredicate>(Int32, ReadOnlySpan<T>, Int32, TPredicate, Boolean, TResult) Aggregates the elements of a vector and returns the result.
TryAggregateWhere<TPredicate>(Vector<T>, Int32, Int32, TPredicate, Nullable<Boolean>, TResult) Aggregates the specified range of elements of a vector and returns the result.
TryAggregateWhere<TPredicate>(Int32, ReadOnlySpan<T>, Int32, ReadOnlySpan<Int32>, TPredicate, Boolean, TResult) Aggregates the specified range of elements of a vector and returns the result.
TryAggregateWhere<T2, TPredicate>(Int32, ReadOnlySpan<T>, Int32, ReadOnlySpan<T2>, Int32, TPredicate, Boolean, TResult) Aggregates the elements of a vector and returns the result.
TryGetAccumulator Attempts to get an accumulator with the specified capability.

Operators

Implicit(Func<Vector<T>, TResult> to Aggregator<T, TResult>) Implicitly converts an aggregation function to an Aggregator<T, TResult> object.

See Also