Aggregator2Group<T>.TryAggregate Method

Definition

Namespace: Extreme.DataAnalysis
Assembly: Extreme.Numerics (in Extreme.Numerics.dll) Version: 8.1.23

Overload List

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

TryAggregate<U>(IVector, IVector, T)

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

Parameters

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

Type Parameters

U

Return Value

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

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

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

Parameters

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

Type Parameters

U
The element type of the vector.

Return Value

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

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

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

Parameters

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

Type Parameters

U

Return Value

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

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

Aggregates the specified elements of a vector and returns the result.
C#
public bool TryAggregate<U>(
	IVector values1,
	IVector values2,
	Array1D<int> indexes,
	int length,
	out T 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  T
The result of the aggregation.

Type Parameters

U

Return Value

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

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

Aggregates the specified range of elements of a vector and returns the result.
C#
public bool TryAggregate<U>(
	IVector values1,
	IVector values2,
	int startIndex,
	int endIndex,
	out T 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  T
The result of the aggregation.

Type Parameters

U

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<U>(Vector<U>, Vector<U>, Array1D<Int32>, Int32, T)

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

Parameters

values1  Vector<U>
A vector of values.
values2  Vector<U>
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  T
The result of the aggregation.

Type Parameters

U

Return Value

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

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

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

Parameters

values1  Vector<U>
A vector of values.
values2  Vector<U>
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  T
The result of the aggregation.

Type Parameters

U

Return Value

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

See Also