Stats.Sum Method

Definition

Namespace: Extreme.Statistics
Assembly: Extreme.Numerics (in Extreme.Numerics.dll) Version: 8.1.23

Overload List

Sum(Double[]) Returns the sum of the elements of an array.
Sum(IEnumerable<Double>) Returns the sum of the elements of a sequence.
Sum(Int32[]) Returns the sum of the elements of an array.
Sum<T>(Vector<T>) Returns the sum of the observations in a Vector<T>.

Sum(Double[])

Returns the sum of the elements of an array.
C#
public static double Sum(
	double[] values
)

Parameters

values  Double[]
A Double array.

Return Value

Double
The sum of the elements of values.

Exceptions

ArgumentNullExceptionvalues is null.

Sum(IEnumerable<Double>)

Returns the sum of the elements of a sequence.
C#
public static double Sum(
	IEnumerable<double> values
)

Parameters

values  IEnumerable<Double>
An object that implements IEnumerable<Double>.

Return Value

Double
The sum of the elements of values.

Exceptions

ArgumentNullExceptionvalues is null.

Sum(Int32[])

Returns the sum of the elements of an array.
C#
public static long Sum(
	int[] values
)

Parameters

values  Int32[]
An Int32 array.

Return Value

Int64
The sum of the elements of values.

Exceptions

ArgumentNullExceptionvalues is null.

Sum<T>(Vector<T>)

Returns the sum of the observations in a Vector<T>.
C#
public static T Sum<T>(
	Vector<T> values
)

Parameters

values  Vector<T>
A Vector<T>.

Type Parameters

T

Return Value

T
The sum of the observations in values.

Exceptions

ArgumentNullExceptionvalues is null.

See Also