BinaryAggregator<T1, T2, TResult>.TryAggregate Method

Definition

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

Overload List

TryAggregate(Vector<T1>, Vector<T2>, TResult) Aggregates the elements of a vector and returns the result.
TryAggregate(Vector<T1>, Vector<T2>, Boolean) Aggregates the elements of a vector and returns the result.
TryAggregate(IEnumerable<T1>, IEnumerable<T2>, Boolean, TResult) Aggregates the elements of two sequences pairwise and returns the result.
TryAggregate(ReadOnlySpan<T1>, ReadOnlySpan<T2>, Boolean, TResult) Aggregates the elements of two spans pairwise and returns the result.
TryAggregate(Int32, ReadOnlySpanSlice<T1>, ReadOnlySpanSlice<T2>, Boolean, TResult) Aggregates the elements of two span slices pairwise and returns the result.
TryAggregate(Vector<T1>, Vector<T2>, Array1D<Int32>, Int32, TResult) Aggregates the specified elements of a vector and returns the result.
TryAggregate(Vector<T1>, Vector<T2>, Int32, Int32, TResult) Aggregates the specified range of elements of a vector and returns the result.

TryAggregate(Vector<T1>, Vector<T2>, TResult)

Aggregates the elements of a vector and returns the result.
C#
public virtual bool TryAggregate(
	Vector<T1> values1,
	Vector<T2> values2,
	out TResult result
)

Parameters

values1  Vector<T1>
A vector of values.
values2  Vector<T2>
A vector of values.
result  TResult
The result of the aggregation.

Return Value

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

TryAggregate(Vector<T1>, Vector<T2>, Boolean)

Aggregates the elements of a vector and returns the result.
C#
public virtual TResult TryAggregate(
	Vector<T1> values1,
	Vector<T2> values2,
	bool skipMissingValues
)

Parameters

values1  Vector<T1>
A vector of values.
values2  Vector<T2>
A vector of values.
skipMissingValues  Boolean
Optional. Specifies whether missing values should be excluded from the aggregation. The default is false.

Return Value

TResult
The result of the aggregation.

TryAggregate(IEnumerable<T1>, IEnumerable<T2>, Boolean, TResult)

Aggregates the elements of two sequences pairwise and returns the result.
C#
public virtual bool TryAggregate(
	IEnumerable<T1> values1,
	IEnumerable<T2> values2,
	bool skipMissingValues,
	out TResult result
)

Parameters

values1  IEnumerable<T1>
A vector of values.
values2  IEnumerable<T2>
A vector of values.
skipMissingValues  Boolean
Indicates whether missing values should be filtered from the sequence.
result  TResult
The result of the aggregation.

Return Value

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

TryAggregate(ReadOnlySpan<T1>, ReadOnlySpan<T2>, Boolean, TResult)

Aggregates the elements of two spans pairwise and returns the result.
C#
public abstract bool TryAggregate(
	ReadOnlySpan<T1> values1,
	ReadOnlySpan<T2> values2,
	bool skipMissingValues,
	out TResult result
)

Parameters

values1  ReadOnlySpan<T1>
A span of values.
values2  ReadOnlySpan<T2>
A span of values.
skipMissingValues  Boolean
Specifies whether missing values should be excluded from the aggregation.
result  TResult
The result of the aggregation.

Return Value

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

TryAggregate(Int32, ReadOnlySpanSlice<T1>, ReadOnlySpanSlice<T2>, Boolean, TResult)

Aggregates the elements of two span slices pairwise and returns the result.
C#
public bool TryAggregate(
	int length,
	ReadOnlySpanSlice<T1> values1,
	ReadOnlySpanSlice<T2> values2,
	bool skipMissingValues,
	out TResult result
)

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.
skipMissingValues  Boolean
Specifies whether missing values should be excluded from the aggregation.
result  TResult
The result of the aggregation.

Return Value

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

TryAggregate(Vector<T1>, Vector<T2>, Array1D<Int32>, Int32, TResult)

Aggregates the specified elements of a vector and returns the result.
C#
public virtual bool TryAggregate(
	Vector<T1> values1,
	Vector<T2> values2,
	Array1D<int> indexes,
	int length,
	out TResult result
)

Parameters

values1  Vector<T1>
A vector of values.
values2  Vector<T2>
A vector of values.
indexes  Array1D<Int32>
An integer array containing the indexes of the elements of values1 and values2 that will be aggregated.
length  Int32
The number of values to aggregate.
result  TResult
The result of the aggregation.

Return Value

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

TryAggregate(Vector<T1>, Vector<T2>, Int32, Int32, TResult)

Aggregates the specified range of elements of a vector and returns the result.
C#
public virtual bool TryAggregate(
	Vector<T1> values1,
	Vector<T2> values2,
	int startIndex,
	int endIndex,
	out TResult result
)

Parameters

values1  Vector<T1>
A vector of values.
values2  Vector<T2>
A vector of values.
startIndex  Int32
The zero-based index of the first element in values1 and values2 that should be aggregated.
endIndex  Int32
The zero-based index of the last element in values1 and values2 and values2 that should be aggregated.
result  TResult
The result of the aggregation.

Return Value

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

See Also