Array Functions<T>.Sum Method
Definition
Namespace: Numerics.NET.LinearAlgebra.Implementation
Assembly: Numerics.NET (in Numerics.NET.dll) Version: 9.0.2
Assembly: Numerics.NET (in Numerics.NET.dll) Version: 9.0.2
Overload List
Sum( | Computes the sum of all elements in the span. |
Sum( | Computes the sum of all elements in the span. |
Sum<TStorage>(Int32, TStorage) | Computes the sum of all elements in the array. |
Sum(Int32, ReadOnlySpanSlice<T>)
Computes the sum of all elements in the span.
public T Sum(
int length,
ReadOnlySpanSlice<T> operand
)
Parameters
- length Int32
- The number of elements in the span.
- operand ReadOnlySpanSlice<T>
- The span that holds the operands.
Return Value
TThe sum of the elements of operand.
Sum<TStorage>(Int32, TStorage)
Computes the sum of all elements in the array.
public T Sum<TStorage>(
int length,
TStorage operand
)
where TStorage : Object, IStorageSlice<T>
Parameters
- length Int32
- The number of elements in the array.
- operand TStorage
- The array that holds the operands.
Type Parameters
- TStorage
Return Value
TThe sum of the elements of operand.
Sum(Int32, ReadOnlySpan<T>, Int32)
Computes the sum of all elements in the span.
public abstract T Sum(
int length,
ReadOnlySpan<T> operand,
int stride
)
Parameters
- length Int32
- The number of elements in the span.
- operand ReadOnlySpan<T>
- The span that holds the operands.
- stride Int32
- The distance between elements in operand.
Return Value
TThe sum of the elements of operand.