LinqExtensions.Aggregate<T, TAccumulate, TResult>(Vector<T>, TAccumulate, Func<TAccumulate, T, TAccumulate>, Func<TAccumulate, TResult>) Method

Aggregates the elements of a vector using the specified accumulator and seed value.

Definition

Namespace: Extreme.DataAnalysis.Linq
Assembly: Extreme.Numerics (in Extreme.Numerics.dll) Version: 8.1.23
C#
public static TResult Aggregate<T, TAccumulate, TResult>(
	this Vector<T> vector,
	TAccumulate seed,
	Func<TAccumulate, T, TAccumulate> func,
	Func<TAccumulate, TResult> resultSelector
)

Parameters

vector  Vector<T>
A vector.
seed  TAccumulate
A seed value for the accumulator.
func  Func<TAccumulate, T, TAccumulate>
A function that accumulates an element of the vector.
resultSelector  Func<TAccumulate, TResult>
A function that transforms the result of the accumulation.

Type Parameters

T
The element type of the vector.
TAccumulate
The return type of the accumulator.
TResult
The type of the result.

Return Value

TResult
The function resultSelector applied to the result of accumulating the values of vector with seed value seed using the function func.

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type Vector<T>. When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).

See Also