AggregatorGroup<TResult>.AggregateWhere Method

Definition

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

Overload List

AggregateWhere<T, TPredicate>(IEnumerable<T>, TPredicate, Boolean) Aggregates the elements of a sequence and returns the result.
AggregateWhere<T, TPredicate>(ReadOnlySpan<T>, TPredicate, Boolean) Aggregates the elements of a span and returns the result.

AggregateWhere<T, TPredicate>(IEnumerable<T>, TPredicate, Boolean)

Aggregates the elements of a sequence and returns the result.
C#
public TResult AggregateWhere<T, TPredicate>(
	IEnumerable<T> values,
	TPredicate predicate,
	bool skipMissingValues = false
)
where TPredicate : struct, new(), IFastFunc<T, bool>

Parameters

values  IEnumerable<T>
A sequence of values.
predicate  TPredicate
A predicate that filters the values that are to be included in the aggregation.
skipMissingValues  Boolean  (Optional)
Optional. Specifies whether missing values should be excluded from the aggregation. The default is false.

Type Parameters

T
The type of the elements of values.
TPredicate
The type of predicate.

Return Value

TResult
The aggregate result.

AggregateWhere<T, TPredicate>(ReadOnlySpan<T>, TPredicate, Boolean)

Aggregates the elements of a span and returns the result.
C#
public TResult AggregateWhere<T, TPredicate>(
	ReadOnlySpan<T> values,
	TPredicate predicate,
	bool skipMissingValues = false
)
where TPredicate : struct, new(), IFastFunc<T, bool>

Parameters

values  ReadOnlySpan<T>
A read-only span.
predicate  TPredicate
A predicate that filters the values that are to be included in the aggregation.
skipMissingValues  Boolean  (Optional)
Optional. Specifies whether missing values should be excluded from the aggregation. The default is false.

Type Parameters

T
The type of the elements of values.
TPredicate
The type of predicate.

Return Value

TResult
The aggregate value.

See Also