Aggregators.Create Method
Definition
Namespace: Numerics.NET.DataAnalysis
Assembly: Numerics.NET (in Numerics.NET.dll) Version: 9.0.2
Assembly: Numerics.NET (in Numerics.NET.dll) Version: 9.0.2
Overload List
Create<T, TResult>(Func<Vector<T>, TResult>) | Constructs a new aggregator from a function. |
Create<T, TResult, TAccumulator>(Func<TAccumulator, TResult>, AggregatorAttributes, TResult) | Constructs a new aggregator that uses the specified accumulator. |
Create<T, TResult, TIntermediate, TAccumulator>(Func<TAccumulator, TResult>, AggregatorAttributes, TResult) |
Create<T, TResult>(Func<Vector<T>, TResult>)
Constructs a new aggregator from a function.
public static Aggregator<T, TResult> Create<T, TResult>(
Func<Vector<T>, TResult> function
)
Parameters
Type Parameters
- T
- The type of the result.
- TResult
- The element type of the inputs.
Return Value
Aggregator<T, TResult>An aggregator group.
Create<T, TResult, TAccumulator>(Func<TAccumulator, TResult>, AggregatorAttributes, TResult)
Constructs a new aggregator that uses the specified accumulator.
public static Aggregator<T, TResult> Create<T, TResult, TAccumulator>(
Func<TAccumulator, TResult> selector,
AggregatorAttributes attributes,
TResult emptyValue
)
where TAccumulator : struct, new(), IAccumulator<T>
Parameters
- selector Func<TAccumulator, TResult>
- attributes AggregatorAttributes
- emptyValue TResult
Type Parameters
- T
- The element type of the inputs to the accumulator.
- TResult
- The element type of the result.
- TAccumulator
- The type of the accumulator.
Return Value
Aggregator<T, TResult>An aggregator that aggregates values of type T into values of type TResult using an accumulator of type TAccumulator.
Create<T, TResult, TIntermediate, TAccumulator>(Func<TAccumulator, TResult>, AggregatorAttributes, TResult)
public static BinaryAggregator<T, T, TResult>? Create<T, TResult, TIntermediate, TAccumulator>(
Func<TAccumulator, TResult> selector,
AggregatorAttributes attributes,
TResult emptyValue
)
where TAccumulator : struct, new(), IBinaryAccumulator<TIntermediate, TIntermediate>
Parameters
- selector Func<TAccumulator, TResult>
- attributes AggregatorAttributes
- emptyValue TResult
Type Parameters
- T
- TResult
- TIntermediate
- TAccumulator