AccumulatorExtensions.Accumulate Method

Definition

Namespace: Numerics.NET.DataAnalysis.Accumulators
Assembly: Numerics.NET (in Numerics.NET.dll) Version: 9.1.0

Overload List

Accumulate<T, TAccumulator>(TAccumulator, T[], Boolean) Accumulates values from an array into the specified accumulator.
Accumulate<T, TAccumulator>(TAccumulator, IEnumerable<T>, Boolean) Accumulates values from an enumerable into the specified accumulator.
Accumulate<T, TAccumulator>(TAccumulator, ReadOnlySpan<T>, Boolean) Accumulates values from a read-only span into the specified accumulator.
Accumulate<T1, T2, TAccumulator>(TAccumulator, T1[], T2[], Boolean) Accumulates values from two arrays into the specified binary accumulator.
Accumulate<T1, T2, TAccumulator>(TAccumulator, IEnumerable<T1>, IEnumerable<T2>, Boolean) Accumulates values from two enumerables into the specified binary accumulator.
Accumulate<T1, T2, TAccumulator>(TAccumulator, ReadOnlySpan<T1>, ReadOnlySpan<T2>, Boolean) Accumulates values from two read-only spans into the specified binary accumulator.

Accumulate<T, TAccumulator>(TAccumulator, T[], Boolean)

Accumulates values from an array into the specified accumulator.
C#
public static void Accumulate<T, TAccumulator>(
	this ref TAccumulator accumulator,
	T[] values,
	bool skipMissingValues = false
)
where TAccumulator : struct, new(), IAccumulator<T>

Parameters

accumulator  TAccumulator
The accumulator to accumulate values into.
values  T[]
The values to accumulate.
skipMissingValues  Boolean  (Optional)
Optional. Specifies whether missing values should be excluded from the aggregation. The default is false.

Type Parameters

T
The type of the values.
TAccumulator
The type of the accumulator.

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type TAccumulator. 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).

Accumulate<T, TAccumulator>(TAccumulator, IEnumerable<T>, Boolean)

Accumulates values from an enumerable into the specified accumulator.
C#
public static void Accumulate<T, TAccumulator>(
	this ref TAccumulator accumulator,
	IEnumerable<T> values,
	bool skipMissingValues = false
)
where TAccumulator : struct, new(), IAccumulator<T>

Parameters

accumulator  TAccumulator
The accumulator to accumulate values into.
values  IEnumerable<T>
The values to accumulate.
skipMissingValues  Boolean  (Optional)
Optional. Specifies whether missing values should be excluded from the aggregation. The default is false.

Type Parameters

T
The type of the values.
TAccumulator
The type of the accumulator.

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type TAccumulator. 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).

Accumulate<T, TAccumulator>(TAccumulator, ReadOnlySpan<T>, Boolean)

Accumulates values from a read-only span into the specified accumulator.
C#
public static void Accumulate<T, TAccumulator>(
	this ref TAccumulator accumulator,
	ReadOnlySpan<T> values,
	bool skipMissingValues = false
)
where TAccumulator : struct, new(), IAccumulator<T>

Parameters

accumulator  TAccumulator
The accumulator to accumulate values into.
values  ReadOnlySpan<T>
The values to accumulate.
skipMissingValues  Boolean  (Optional)
Optional. Specifies whether missing values should be excluded from the aggregation. The default is false.

Type Parameters

T
The type of the values.
TAccumulator
The type of the accumulator.

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type TAccumulator. 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).

Accumulate<T1, T2, TAccumulator>(TAccumulator, T1[], T2[], Boolean)

Accumulates values from two arrays into the specified binary accumulator.
C#
public static void Accumulate<T1, T2, TAccumulator>(
	this ref TAccumulator accumulator,
	T1[] values1,
	T2[] values2,
	bool skipMissingValues = false
)
where TAccumulator : struct, new(), IBinaryAccumulator<T1, T2>

Parameters

accumulator  TAccumulator
The binary accumulator to accumulate values into.
values1  T1[]
The first set of values to accumulate.
values2  T2[]
The second set of values to accumulate.
skipMissingValues  Boolean  (Optional)
Optional. Specifies whether missing values should be excluded from the aggregation. The default is false.

Type Parameters

T1
The type of the first set of values.
T2
The type of the second set of values.
TAccumulator
The type of the binary accumulator.

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type TAccumulator. 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).

Accumulate<T1, T2, TAccumulator>(TAccumulator, IEnumerable<T1>, IEnumerable<T2>, Boolean)

Accumulates values from two enumerables into the specified binary accumulator.
C#
public static void Accumulate<T1, T2, TAccumulator>(
	this ref TAccumulator accumulator,
	IEnumerable<T1> values1,
	IEnumerable<T2> values2,
	bool skipMissingValues = false
)
where TAccumulator : struct, new(), IBinaryAccumulator<T1, T2>

Parameters

accumulator  TAccumulator
The binary accumulator to accumulate values into.
values1  IEnumerable<T1>
The first set of values to accumulate.
values2  IEnumerable<T2>
The second set of values to accumulate.
skipMissingValues  Boolean  (Optional)
Optional. Specifies whether missing values should be excluded from the aggregation. The default is false.

Type Parameters

T1
The type of the first set of values.
T2
The type of the second set of values.
TAccumulator
The type of the binary accumulator.

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type TAccumulator. 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).

Accumulate<T1, T2, TAccumulator>(TAccumulator, ReadOnlySpan<T1>, ReadOnlySpan<T2>, Boolean)

Accumulates values from two read-only spans into the specified binary accumulator.
C#
public static void Accumulate<T1, T2, TAccumulator>(
	this ref TAccumulator accumulator,
	ReadOnlySpan<T1> values1,
	ReadOnlySpan<T2> values2,
	bool skipMissingValues = false
)
where TAccumulator : struct, new(), IBinaryAccumulator<T1, T2>

Parameters

accumulator  TAccumulator
The binary accumulator to accumulate values into.
values1  ReadOnlySpan<T1>
The first set of values to accumulate.
values2  ReadOnlySpan<T2>
The second set of values to accumulate.
skipMissingValues  Boolean  (Optional)
Optional. Specifies whether missing values should be excluded from the aggregation. The default is false.

Type Parameters

T1
The type of the first set of values.
T2
The type of the second set of values.
TAccumulator
The type of the binary accumulator.

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type TAccumulator. 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).

See Also