Linq Extensions.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#
The function resultSelector applied to the result of accumulating the values of vector with seed value seed using the function func.
Assembly: Extreme.Numerics (in Extreme.Numerics.dll) Version: 8.1.23
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
TResultThe function resultSelector applied to the result of accumulating the values of vector with seed value seed using the function func.