Binary Accumulating Aggregator<T1, T2, TResult, TIntermediate, TConverter1, TConverter2, TAccumulator>.Try Aggregate Where Method
Definition
Namespace: Numerics.NET.DataAnalysis
Assembly: Numerics.NET (in Numerics.NET.dll) Version: 9.0.2
Assembly: Numerics.NET (in Numerics.NET.dll) Version: 9.0.2
Overload List
Try | Aggregates the elements of two sequences pairwise subject to a predicate, and returns the result. |
Try | Aggregates the elements of two spans pairwise and returns the result. |
Try | Aggregates the elements of a vector and returns the result. |
Try | Aggregates the elements of two span slices pairwise and returns the result. |
TryAggregateWhere<TPredicate>(IEnumerable<T1>, IEnumerable<T2>, TPredicate, Boolean, TResult)
Aggregates the elements of two sequences pairwise subject to a predicate,
and returns the result.
public override bool TryAggregateWhere<TPredicate>(
IEnumerable<T1> values1,
IEnumerable<T2> values2,
TPredicate predicate,
bool skipMissingValues,
out TResult result
)
where TPredicate : struct, new(), IFastFunc<T1, T2, bool>
Parameters
- values1 IEnumerable<T1>
- A vector of values.
- values2 IEnumerable<T2>
- A vector of values.
- predicate TPredicate
- The predicate that determines whether a given input is to be included in the aggregation.
- skipMissingValues Boolean
- Specifies whether missing values should be excluded from the aggregation.
- result TResult
- The result of the aggregation.
Type Parameters
- TPredicate
- The type of predicate.
Return Value
Booleantrue if the aggregation produced a result; otherwise false.
Remarks
predicate is evaluated for each pair of
corresponding elements of values1 and
values2. If the result is true,
then the values are included in the aggregation.
TryAggregateWhere<TPredicate>(ReadOnlySpan<T1>, ReadOnlySpan<T2>, TPredicate, Boolean, TResult)
Aggregates the elements of two spans pairwise and returns the result.
public override bool TryAggregateWhere<TPredicate>(
ReadOnlySpan<T1> values1,
ReadOnlySpan<T2> values2,
TPredicate predicate,
bool skipMissingValues,
out TResult result
)
where TPredicate : struct, new(), IFastFunc<T1, T2, bool>
Parameters
- values1 ReadOnlySpan<T1>
- A span of values.
- values2 ReadOnlySpan<T2>
- A span of values.
- predicate TPredicate
- The predicate that determines whether a given input is to be included in the aggregation.
- skipMissingValues Boolean
- Specifies whether missing values should be excluded from the aggregation.
- result TResult
- The result of the aggregation.
Type Parameters
- TPredicate
- The type of predicate.
Return Value
Booleantrue if the aggregation produced a result; otherwise false.
Remarks
predicate is evaluated for each pair of
corresponding elements of values1 and
values2. If the result is true,
then the values are included in the aggregation.
TryAggregateWhere<TPredicate>(Int32, ReadOnlySpanSlice<T1>, ReadOnlySpanSlice<T2>, TPredicate, Boolean, TResult)
Aggregates the elements of two span slices pairwise and returns the result.
public override bool TryAggregateWhere<TPredicate>(
int length,
ReadOnlySpanSlice<T1> values1,
ReadOnlySpanSlice<T2> values2,
TPredicate predicate,
bool skipMissingValues,
out TResult result
)
where TPredicate : struct, new(), IFastFunc<T1, T2, bool>
Parameters
- length Int32
- The number of elements to include in the aggregation.
- values1 ReadOnlySpanSlice<T1>
- A span of values.
- values2 ReadOnlySpanSlice<T2>
- A span of values.
- predicate TPredicate
- The predicate that determines whether a given input is to be included in the aggregation.
- skipMissingValues Boolean
- Specifies whether missing values should be excluded from the aggregation.
- result TResult
- The result of the aggregation.
Type Parameters
- TPredicate
- The type of predicate.
Return Value
Booleantrue if the aggregation produced a result; otherwise false.
Remarks
predicate is evaluated for each pair of
corresponding elements of values1 and
values2. If the result is true,
then the values are included in the aggregation.