3#ifndef pRC_CORE_COMPLEX_FUNCTIONS_NORM_H
4#define pRC_CORE_COMPLEX_FUNCTIONS_NORM_H
10 template<Index P, Index Q = P, IsComplex T>
11 requires(P == 1 && Q == 1)
12 static inline constexpr auto norm(
T const &a)
14 return abs(a.real()) +
abs(a.imag());
17 template<Index P, Index Q, IsComplex T>
18 requires(P == 2 && Q == 1)
19 static inline constexpr auto norm(
T const &a)
21 return a.real() * a.real() + a.imag() * a.imag();
24 template<Index P = 2, Index Q = P, IsComplex T>
25 requires(P == 2 && Q == 2)
26 static inline constexpr auto norm(
T const &a)
Definition cholesky.hpp:10
static constexpr auto sqrt(T const &a)
Definition sqrt.hpp:11
static constexpr auto abs(T const &a)
Definition abs.hpp:11
static constexpr auto norm(T const &a)
Definition norm.hpp:12