Computes the sum of the elements in a segment of an array.
Namespace:
Extreme.Mathematics
Assembly:
Extreme.Numerics (in Extreme.Numerics.dll) Version: 8.1.1
public static double Sum(
this double[] array,
int startIndex,
int Length
)
<ExtensionAttribute>
Public Shared Function Sum (
array As Double(),
startIndex As Integer,
Length As Integer
) As Double
public:
[ExtensionAttribute]
static double Sum(
array<double>^ array,
int startIndex,
int Length
)
[<ExtensionAttribute>]
static member Sum :
array : float[] *
startIndex : int *
Length : int -> float
Parameters
- array
- Type: SystemDouble
A Double array. - startIndex
- Type: SystemInt32
The zero-based index of the first element
to be included in the sum. - Length
- Type: SystemInt32
The length of the segment.
Return Value
Type:
DoubleThe sum of the specified elements in
array.
Usage Note
In Visual Basic and C#, you can call this method as an instance method on any object of type . 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