norm2 (Linear Algebra)


Import

#include <archr/algebra/norm2.h>
#include <archr/algebra/norm2.hpp>

Synopsis

 float archr_algebra_norm2_f32(const float *x, size_t nbelem);
(1)
 double archr_algebra_norm2_f64(const double *x, size_t nbelem);
(2)
 float archr_algebra_norm2_zf32(const void *x, size_t nbelem);
(3)
 double archr_algebra_norm2_zf64(const void *x, size_t nbelem);
(4)
 float archr_algebra_norm2r_f32(const float *first, const float *last);
(5)
 double archr_algebra_norm2r_f64(const double *first, const double *last);
(6)
 float archr_algebra_norm2r_zf32(const void *first, const void *last);
(7)
 double archr_algebra_norm2r_zf64(const void *first, const void *last);
(8)
 float norm2(const float *x, size_t nbelem);
(1)
 double norm2(const double *x, size_t nbelem);
(2)
 float norm2(const std::complex<float>*x, size_t nbelem);
(3)
 double norm2(const std::complex<double>*x, size_t nbelem);
(4)
 float norm2(const float *first, const float *last);
(5)
 double norm2(const double *first, const double *last);
(6)
 float norm2(const std::complex<float>*first, const std::complex<float>*last);
(7)
 double norm2(const std::complex<double>*first, const std::complex<double>*last);
(8)
template <typename Range> typename Range::value_type norm2(const Range& x);
(9)
subroutine archr_algebra_norm2_f32(real(4) :: r, real(4), dimension(*), parameter :: x, integer(4) :: nbelem)
(1)
subroutine archr_algebra_norm2_f64(real(8) :: r, real(8), dimension(*), parameter :: x, integer(4) :: nbelem)
(2)
subroutine archr_algebra_norm2_zf32(real(4) :: r, complex(4), dimension(*), parameter :: x, integer(4) :: nbelem)
(3)
subroutine archr_algebra_norm2_zf64(real(8) :: r, complex(8), dimension(*), parameter :: x, integer(4) :: nbelem)
(4)
function r = archr_algebra_norm2(x)
(1)

Description

This function computes the norm2 of a given data ranges stored in:

$$\sqrt{\sum_{i=0}^{nbelem} |X[i]|^2}$$

where X is the vector stored in the x.

Parameters

x, first

the beginning of the first norm2 range.

last

the end of the first norm2 range.

y

the beginning of the second norm2 range.

nbelem

the number of elements to process.

Return value

The norm2 between the elements of the two given ranges.

Example

Possible Output

Possible Output

Possible Output