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

Applies an accumulator function over the elements of a vector.

Definition

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

Parameters

vector  Vector<T>
A vector to aggregate over.
seed  TAccumulate
The initial accumulator value.
func  Func<TAccumulate, T, TAccumulate>
An accumulator function to apply to each element.

Type Parameters

T
The type of the elements of the vector.
TAccumulate
The type of the accumulator value.

Return Value

TAccumulate
The final accumulator value.

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