BinaryAggregatorGroup<TResult>.TryAggregate Method

Definition

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

Overload List

TryAggregate<T>(IVector, IVector, TResult) Aggregates the elements of a vector and returns the result.
TryAggregate<T>(Vector<T>, Vector<T>, TResult) Aggregates the elements of a vector and returns the result.
TryAggregate<T>(IEnumerable<T>, IEnumerable<T>, Boolean, TResult) Aggregates the elements of a sequence and returns the result.
TryAggregate<T>(IVector, IVector, Array1D<Int32>, Int32, TResult) Aggregates the specified elements of a vector and returns the result.
TryAggregate<T>(IVector, IVector, Int32, Int32, TResult) Aggregates the specified range of elements of a vector and returns the result.
TryAggregate<T>(Vector<T>, Vector<T>, Array1D<Int32>, Int32, TResult) Aggregates the specified elements of a vector and returns the result.
TryAggregate<T>(Vector<T>, Vector<T>, Int32, Int32, TResult) Aggregates the specified range of elements of a vector and returns the result.

TryAggregate<T>(IVector, IVector, TResult)

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

Parameters

values1  IVector
A vector of values.
values2  IVector
A vector of values.
result  TResult
The vector that is to hold the result.

Type Parameters

T

Return Value

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

TryAggregate<T>(Vector<T>, Vector<T>, TResult)

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

Parameters

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

Type Parameters

T
The element type of the vector.

Return Value

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

TryAggregate<T>(IEnumerable<T>, IEnumerable<T>, Boolean, TResult)

Aggregates the elements of a sequence and returns the result.
C#
public bool TryAggregate<T>(
	IEnumerable<T> values1,
	IEnumerable<T> values2,
	bool skipMissingValues,
	out TResult result
)

Parameters

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

Type Parameters

T

Return Value

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

TryAggregate<T>(IVector, IVector, Array1D<Int32>, Int32, TResult)

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

Parameters

values1  IVector
A vector of values.
values2  IVector
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.

Type Parameters

T

Return Value

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

TryAggregate<T>(IVector, IVector, Int32, Int32, TResult)

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

Parameters

values1  IVector
A vector of values.
values2  IVector
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 that should be aggregated.
result  TResult
The result of the aggregation.

Type Parameters

T

Return Value

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

Exceptions

ArgumentNullException

values1 is null.

-or-

values2 is null.

DimensionMismatchException

The length of values1 does not equal the length of values2.

TryAggregate<T>(Vector<T>, Vector<T>, Array1D<Int32>, Int32, TResult)

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

Parameters

values1  Vector<T>
A vector of values.
values2  Vector<T>
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.

Type Parameters

T

Return Value

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

TryAggregate<T>(Vector<T>, Vector<T>, Int32, Int32, TResult)

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

Parameters

values1  Vector<T>
A vector of values.
values2  Vector<T>
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 that should be aggregated.
result  TResult
The result of the aggregation.

Type Parameters

T

Return Value

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

See Also