Aggregator<T, TResult>.Create<TIntermediate, TAccumulator> Method
Creates an aggregator that converts inputs to an intermediate type
before passing them to an accumulator of the specified type
to perform the aggregation.
Definition
Namespace: Numerics.NET.DataAnalysis
Assembly: Numerics.NET (in Numerics.NET.dll) Version: 9.0.2
C#
The requested aggregator, or null if the aggregator could not be created.
Assembly: Numerics.NET (in Numerics.NET.dll) Version: 9.0.2
public static Aggregator<T, TResult>? Create<TIntermediate, TAccumulator>(
Func<TAccumulator, TResult> selector,
AggregatorAttributes attributes,
TResult emptyValue = null
)
where TAccumulator : struct, new(), IAccumulator<TIntermediate>
Parameters
- selector Func<TAccumulator, TResult>
- A delegate that extracts the aggregated value from the accumulator.
- attributes AggregatorAttributes
- Specifies properties of aggregator used to optimize its application.
- emptyValue TResult (Optional)
- The value of the aggregation when the input is empty.
Type Parameters
- TIntermediate
- The intermediate type used as input for the accumulator.
- TAccumulator
- The type of the accumulator.
Return Value
Aggregator<T, TResult>The requested aggregator, or null if the aggregator could not be created.