Calculates the sum of the squared deviations from the mean of the elements of a given vector.

Namespace:  CenterSpace.NMath.Core
Assembly:  NMath (in NMath.dll) Version: 5.1.0.0

Syntax

C#
public static float SumOfSquares(
	FloatVector v
)
Visual Basic (Declaration)
Public Shared Function SumOfSquares ( _
	v As FloatVector _
) As Single
Visual C++
public:
static float SumOfSquares(
	FloatVector^ v
)

Parameters

v
Type: CenterSpace.NMath.Core..::.FloatVector
A vector.

Return Value

The sum of the squared deviations from the mean of the elements of v.

Remarks

CopyC#
s = (v[0] - mean)^2 + (v[1] - mean)^2 ... + (v[n] - mean)^2

See Also