AccumulatingAggregator<T, TResult, TAccumulator>.TryAggregateWhere Method

Definition

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

Overload List

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.
TryAggregateWhere<T2, TPredicate>(Int32, ReadOnlySpan<T>, Int32, ReadOnlySpan<T2>, Int32, TPredicate, 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.
C#
public override bool TryAggregateWhere<TPredicate>(
	IEnumerable<T> values,
	TPredicate predicate,
	bool skipMissingValues,
	out TResult result
)
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
Specifies whether missing values should be excluded from the aggregation.
result  TResult
On return, the result of the aggregation.

Type Parameters

TPredicate
The type of predicate.

Return Value

Boolean
true if the aggregation produced a result; otherwise false.

TryAggregateWhere<TPredicate>(ReadOnlySpan<T>, TPredicate, Boolean, TResult)

Aggregates the elements of a vector and returns the result.
C#
public override bool TryAggregateWhere<TPredicate>(
	ReadOnlySpan<T> values,
	TPredicate predicate,
	bool skipMissingValues,
	out TResult result
)
where TPredicate : struct, new(), IFastFunc<T, bool>

Parameters

values  ReadOnlySpan<T>
A read-only span of values.
predicate  TPredicate
A predicate that filters the values that are to be included in the aggregation.
skipMissingValues  Boolean
Specifies whether missing values should be excluded from the aggregation.
result  TResult
On return, the result of the aggregation.

Type Parameters

TPredicate
The type of predicate.

Return Value

Boolean
true if the aggregation produced a result; otherwise false.

TryAggregateWhere<TPredicate>(Int32, ReadOnlySpan<T>, Int32, TPredicate, Boolean, TResult)

Aggregates the elements of a vector and returns the result.
C#
public override bool TryAggregateWhere<TPredicate>(
	int length,
	ReadOnlySpan<T> values,
	int stride,
	TPredicate predicate,
	bool skipMissingValues,
	out TResult result
)
where TPredicate : struct, new(), IFastFunc<T, bool>

Parameters

length  Int32
The number of elements in the input.
values  ReadOnlySpan<T>
A read-only span of values.
stride  Int32
The distance between successive elements in values.
predicate  TPredicate
A predicate that filters the values that are to be included in the aggregation.
skipMissingValues  Boolean
Specifies whether missing values should be excluded from the aggregation.
result  TResult
On return, the result of the aggregation.

Type Parameters

TPredicate
The type of predicate.

Return Value

Boolean
true if the aggregation produced a result; otherwise false.

TryAggregateWhere<TPredicate>(Vector<T>, Int32, Int32, TPredicate, Nullable<Boolean>, TResult)

Aggregates the specified range of elements of a vector and returns the result.
C#
public override bool TryAggregateWhere<TPredicate>(
	Vector<T> values,
	int startIndex,
	int endIndex,
	TPredicate predicate,
	bool? skipMissingValues,
	out TResult result
)
where TPredicate : struct, new(), IFastFunc<T, bool>

Parameters

values  Vector<T>
A vector of values.
startIndex  Int32
The zero-based index of the first element in values that should be aggregated.
endIndex  Int32
The zero-based index of the last element in values that should be aggregated.
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  TResult
On return, the result of the aggregation.

Type Parameters

TPredicate
The type of predicate.

Return Value

Boolean
true if the aggregation produced a result; otherwise false.

TryAggregateWhere<TPredicate>(Int32, ReadOnlySpan<T>, Int32, ReadOnlySpan<Int32>, TPredicate, Boolean, TResult)

Aggregates the specified range of elements of a vector and returns the result.
C#
public override bool TryAggregateWhere<TPredicate>(
	int length,
	ReadOnlySpan<T> values,
	int stride,
	ReadOnlySpan<int> indexes,
	TPredicate predicate,
	bool skipMissingValues,
	out TResult result
)
where TPredicate : struct, new(), IFastFunc<T, bool>

Parameters

length  Int32
The number of elements in the input.
values  ReadOnlySpan<T>
A read-only span of values.
stride  Int32
The distance between successive elements in values.
indexes  ReadOnlySpan<Int32>
A read-only span of indexes into values.
predicate  TPredicate
A predicate that filters the values that are to be included in the aggregation.
skipMissingValues  Boolean
Specifies whether missing values should be excluded from the aggregation.
result  TResult
On return, the result of the aggregation.

Type Parameters

TPredicate
The type of predicate.

Return Value

Boolean
true if the aggregation produced a result; otherwise false.

TryAggregateWhere<T2, TPredicate>(Int32, ReadOnlySpan<T>, Int32, ReadOnlySpan<T2>, Int32, TPredicate, Boolean, TResult)

Aggregates the elements of a vector and returns the result.
C#
public override bool TryAggregateWhere<T2, TPredicate>(
	int length,
	ReadOnlySpan<T> values,
	int stride,
	ReadOnlySpan<T2> values2,
	int stride2,
	TPredicate predicate,
	bool skipMissingValues,
	out TResult result
)
where TPredicate : struct, new(), IFastFunc<T, T2, bool>

Parameters

length  Int32
The number of elements to aggregate.
values  ReadOnlySpan<T>
A read-only span of values.
stride  Int32
The distance between successive elements in values.
values2  ReadOnlySpan<T2>
A read-only span of secondary input values.
stride2  Int32
The distance between successive elements in values2.
predicate  TPredicate
A predicate that filters the values that are to be included in the aggregation.
skipMissingValues  Boolean
Specifies whether missing values should be excluded from the aggregation.
result  TResult
On return, the result of the aggregation.

Type Parameters

T2
TPredicate

Return Value

Boolean
true if the aggregation produced a result; otherwise false.

See Also