|
Anasazi Version of the Day
|
Map from Scalar type to its arithmetic properties. More...
#include <Tsqr_ScalarTraits.hpp>
Public Types | |
| typedef Scalar | magnitude_type |
Static Public Member Functions | |
| static Scalar | zero () |
| static Scalar | one () |
| static magnitude_type | pi () |
| static Scalar | conj (const Scalar &z) |
| static magnitude_type | abs (const Scalar &z) |
Static Public Attributes | |
| static const bool | is_specialized = false |
| static const bool | is_complex = false |
Map from Scalar type to its arithmetic properties.
ScalarTraits dispatches from a Scalar data type, to its arithmetic properties. These include the type of its absolute value / magnitude, zero, one,
, and functions for computing its absolute value resp. conjugate.
Definition at line 60 of file Tsqr_ScalarTraits.hpp.
| typedef Scalar TSQR::ScalarTraits< Scalar >::magnitude_type |
If Scalar is complex, this is the type of its magnitude, and the type of its real and complex parts. (That means, if the real and complex parts can be negative, magnitude_type is allowed to be negative as well, even though magnitudes themselves (as returned by abs(), see below) are nonnegative.)
Definition at line 74 of file Tsqr_ScalarTraits.hpp.
| static Scalar TSQR::ScalarTraits< Scalar >::zero | ( | ) | [static] |
The arithmetic identity for the given Scalar data type.
| static Scalar TSQR::ScalarTraits< Scalar >::one | ( | ) | [static] |
The multiplicative identity for the given Scalar data type.
| static magnitude_type TSQR::ScalarTraits< Scalar >::pi | ( | ) | [inline, static] |
The value of
(ratio of a circle's circumference to its diameter) for magnitude_type.
Definition at line 88 of file Tsqr_ScalarTraits.hpp.
| static Scalar TSQR::ScalarTraits< Scalar >::conj | ( | const Scalar & | z | ) | [inline, static] |
Complex conjugate of z, in case is_complex == true, else just z
| static magnitude_type TSQR::ScalarTraits< Scalar >::abs | ( | const Scalar & | z | ) | [inline, static] |
Absolute value of z
const bool TSQR::ScalarTraits< Scalar >::is_specialized = false [static] |
Whether we've specialized this traits class for the particular Scalar type. If you're writing your own specialization, you should set this to true.
Definition at line 65 of file Tsqr_ScalarTraits.hpp.
const bool TSQR::ScalarTraits< Scalar >::is_complex = false [static] |
Whether Scalar represents a complex number.
Definition at line 68 of file Tsqr_ScalarTraits.hpp.
1.7.4