Click or drag to resize

VectorMathL2Norm(IReadOnlyListSingle, Int32, Int32) Method

Given an n-vector x, this function calculates the euclidean norm of x.

Namespace: Altaxo.Calc.LinearAlgebra
Assembly: AltaxoCore (in AltaxoCore.dll) Version: 4.8.3179.0 (4.8.3179.0)
Syntax
C#
public static double L2Norm(
	this IReadOnlyList<float> vector,
	int startIndex,
	int count
)

Parameters

vector  IReadOnlyListSingle
An input array of length n.
startIndex  Int32
The index of the first element in x to process.
count  Int32
A positive integer input variable of the number of elements to process.

Return Value

Double
The euclidian norm of the vector of length n, i.e. the square root of the sum of squares of the elements.

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type IReadOnlyListSingle. 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).
Remarks
the euclidean norm is computed by accumulating the sum of squares in three different sums. the sums of squares for the small and large components are scaled so that no overflows occur. non-destructive underflows are permitted. underflows and overflows do not occur in the computation of the unscaled sum of squares for the intermediate components. the definitions of small, intermediate and large components depend on two constants, rdwarf and rgiant. the main restrictions on these constants are that rdwarf**2 not underflow and rgiant**2 not overflow. the constants given here are suitable for every known computer.

burton s. garbow, kenneth e. hillstrom, jorge j. more

See Also