function that calculates the Euclidean norm (L2 norm or modulus) of a vector , where where is the dimension of the complex vector .
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
complex(kind=dp), | DIMENSION(:) | :: | a |
FUNCTION norm_2_complex(a) RESULT(result) COMPLEX(dp), DIMENSION(:) :: a REAL(dp) :: result result = SQRT(REAL(DOT_PRODUCT(a, CONJG(a)))) END FUNCTION norm_2_complex