Public Types | |
typedef number | real_type |
Static Public Member Functions | |
static std::complex< number > | conjugate (const std::complex< number > &x) |
static real_type | abs_square (const std::complex< number > &x) |
static real_type | abs (const std::complex< number > &x) |
Static Public Attributes | |
static const bool | is_complex = true |
Specialization of the general NumberTraits class that provides the relevant information if the underlying data type is std::complex<T>.
typedef number numbers::NumberTraits< std::complex< number > >::real_type |
For this data type, typedef the corresponding real type. Since this specialization of the template is selected for number types std::complex<T>, the real type is equal to the type used to store the two components of the complex number.
std::complex< number > numbers::NumberTraits< std::complex< number > >::conjugate | ( | const std::complex< number > & | x | ) | [inline, static] |
Return the complex-conjugate of the given number.
NumberTraits< std::complex< number > >::real_type numbers::NumberTraits< std::complex< number > >::abs_square | ( | const std::complex< number > & | x | ) | [inline, static] |
Return the square of the absolute value of the given number. Since this specialization of the general template is chosen for types equal to std::complex, this function returns the product of a number and its complex conjugate.
NumberTraits< std::complex< number > >::real_type numbers::NumberTraits< std::complex< number > >::abs | ( | const std::complex< number > & | x | ) | [inline, static] |
Return the absolute value of a complex number.
const bool numbers::NumberTraits< std::complex< number > >::is_complex = true [static] |
A flag that specifies whether the template type given to this class is complex or real. Since this specialization of the general template is selected for complex types, the answer is true
.