In file DVector.cpp:

DIVAMatrixExport double CDVector::Norm2() const

Calculates the two-norm (L2) of the vector.

Documentation

Calculates the two-norm (L2) of the vector. Also known as the Euclidean length.

L2(v) = sqrt( x_1^2 + x_2^2 .. + x_n^2 )

Returns:
The L2 norm.
Author:
Mikkel B. Stegmann
Version:
2-5-2001


Back DIVA Reference Manual The DIVA-Site