Stats.SumOfSquares Method

Definition

Namespace: Numerics.NET.Statistics
Assembly: Numerics.NET (in Numerics.NET.dll) Version: 9.0.4

Overload List

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

SumOfSquares(Double[])

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

Parameters

values  Double[]
A Double array.

Return Value

Double
The sum of the squares of the elements of values.

Exceptions

ArgumentNullException

values is null.

SumOfSquares(IEnumerable<Double>)

Returns the sum of the squares of the elements of an array.
C#
public static double SumOfSquares(
	IEnumerable<double> values
)

Parameters

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

Return Value

Double
The sum of the squares of the elements of values.

Exceptions

ArgumentNullException

values is null.

SumOfSquares(Int32[])

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

Parameters

values  Int32[]
An Int32 array.

Return Value

Double
The sum of the squares of the elements of values.

Exceptions

ArgumentNullException

values is null.

SumOfSquares<T>(Vector<T>)

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

Parameters

values  Vector<T>
A Vector<T>.

Type Parameters

T

Return Value

T
The sum of the squares of the observations in values.

Exceptions

ArgumentNullException

values is null.

See Also