Applies an accumulator function over the elements of a vector.
Namespace:
Extreme.DataAnalysis.Linq
Assembly:
Extreme.Numerics (in Extreme.Numerics.dll) Version: 8.1.1
public static TAccumulate Aggregate<T, TAccumulate>(
this Vector<T> vector,
TAccumulate seed,
Func<TAccumulate, T, TAccumulate> func
)
<ExtensionAttribute>
Public Shared Function Aggregate(Of T, TAccumulate) (
vector As Vector(Of T),
seed As TAccumulate,
func As Func(Of TAccumulate, T, TAccumulate)
) As TAccumulate
public:
[ExtensionAttribute]
generic<typename T, typename TAccumulate>
static TAccumulate Aggregate(
Vector<T>^ vector,
TAccumulate seed,
Func<TAccumulate, T, TAccumulate>^ func
)
[<ExtensionAttribute>]
static member Aggregate :
vector : Vector<'T> *
seed : 'TAccumulate *
func : Func<'TAccumulate, 'T, 'TAccumulate> -> 'TAccumulate
Parameters
- vector
- Type: Extreme.MathematicsVectorT
A vector to aggregate over. - seed
- Type: TAccumulate
The initial accumulator value. - func
- Type: SystemFuncTAccumulate, 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
Type:
TAccumulateThe final accumulator value.
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