Aggregates the elements of a vector using the specified accumulator
and seed value.
Namespace:
Extreme.DataAnalysis.Linq
Assembly:
Extreme.Numerics (in Extreme.Numerics.dll) Version: 8.1.1
public static TResult Aggregate<T, TAccumulate, TResult>(
this Vector<T> vector,
TAccumulate seed,
Func<TAccumulate, T, TAccumulate> func,
Func<TAccumulate, TResult> resultSelector
)
<ExtensionAttribute>
Public Shared Function Aggregate(Of T, TAccumulate, TResult) (
vector As Vector(Of T),
seed As TAccumulate,
func As Func(Of TAccumulate, T, TAccumulate),
resultSelector As Func(Of TAccumulate, TResult)
) As TResult
public:
[ExtensionAttribute]
generic<typename T, typename TAccumulate, typename TResult>
static TResult Aggregate(
Vector<T>^ vector,
TAccumulate seed,
Func<TAccumulate, T, TAccumulate>^ func,
Func<TAccumulate, TResult>^ resultSelector
)
[<ExtensionAttribute>]
static member Aggregate :
vector : Vector<'T> *
seed : 'TAccumulate *
func : Func<'TAccumulate, 'T, 'TAccumulate> *
resultSelector : Func<'TAccumulate, 'TResult> -> 'TResult
Parameters
- vector
- Type: Extreme.MathematicsVectorT
A vector. - seed
- Type: TAccumulate
A seed value for the accumulator. - func
- Type: SystemFuncTAccumulate, T, TAccumulate
A function that accumulates an element of the vector. - resultSelector
- Type: SystemFuncTAccumulate, 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
Type:
TResultThe 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
VectorT. 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).
Reference