Applies an accumulator function over the rows of a data frame.
The specified seed value is used as the initial accumulator value.
Namespace:
Extreme.DataAnalysis.Linq
Assembly:
Extreme.Numerics (in Extreme.Numerics.dll) Version: 8.1.1
public static TResult Aggregate<R, C, TAccumulate, TResult>(
this DataFrame<R, C> frame,
TAccumulate seed,
Func<TAccumulate, DataFrameRow<R, C>, TAccumulate> func,
Func<TAccumulate, TResult> resultSelector
)
<ExtensionAttribute>
Public Shared Function Aggregate(Of R, C, TAccumulate, TResult) (
frame As DataFrame(Of R, C),
seed As TAccumulate,
func As Func(Of TAccumulate, DataFrameRow(Of R, C), TAccumulate),
resultSelector As Func(Of TAccumulate, TResult)
) As TResult
public:
[ExtensionAttribute]
generic<typename R, typename C, typename TAccumulate, typename TResult>
static TResult Aggregate(
DataFrame<R, C>^ frame,
TAccumulate seed,
Func<TAccumulate, DataFrameRow<R, C>^, TAccumulate>^ func,
Func<TAccumulate, TResult>^ resultSelector
)
[<ExtensionAttribute>]
static member Aggregate :
frame : DataFrame<'R, 'C> *
seed : 'TAccumulate *
func : Func<'TAccumulate, DataFrameRow<'R, 'C>, 'TAccumulate> *
resultSelector : Func<'TAccumulate, 'TResult> -> 'TResult
Parameters
- frame
- Type: Extreme.DataAnalysisDataFrameR, C
A data frame to project. - seed
- Type: TAccumulate
The initial accumulator value. - func
- Type: SystemFuncTAccumulate, DataFrameRowR, C, TAccumulate
An accumulator function to be invoked on each element. - resultSelector
- Type: SystemFuncTAccumulate, TResult
A function to be applied to the final accumulator value.
Type Parameters
- R
- The element type of the row index of the data frame.
- C
- The element type of the column index of the data frame.
- TAccumulate
- The type of the accumulated value.
- TResult
- The type of the final result.
Return Value
Type:
TResultThe final accumulator value.
Usage Note
In Visual Basic and C#, you can call this method as an instance method on any object of type
DataFrameR,
C. 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