![]() |
Chemical Data Processing Library C++ API - Version 1.4.0
|
Common operations and type aliases for scalar arithmetic types. More...
#include <TypeTraits.hpp>
Inheritance diagram for CDPL::Math::ScalarTraits< T >:Public Types | |
| typedef T | ValueType |
| The scalar value type. More... | |
| typedef T | RealType |
| The real-valued type (identical to ValueType for scalar traits). More... | |
| typedef const T & | ConstReference |
| Constant-reference type to a value. More... | |
| typedef ScalarTraits< T > | SelfType |
| Convenience alias for this traits instantiation. More... | |
Static Public Member Functions | |
| static RealType | real (ConstReference t) |
| Returns the real part of t (identical to t for non-complex scalars). More... | |
| static RealType | imag (ConstReference) |
| Returns the imaginary part (always zero for non-complex scalars). More... | |
| static RealType | conj (ConstReference t) |
| Returns the complex conjugate of t (identical to t for non-complex scalars). More... | |
| static RealType | abs (ConstReference t) |
Returns the absolute value of t (std::abs for signed types, the identity for unsigned types). More... | |
| static ValueType | sqrt (ConstReference t) |
| Returns the square root of t. More... | |
| static RealType | norm1 (ConstReference t) |
| Returns the L1 norm of t (identical to the absolute value for scalar values). More... | |
| static RealType | norm2 (ConstReference t) |
| Returns the L2 (Euclidean) norm of t (identical to the absolute value for scalar values). More... | |
| static RealType | normInf (ConstReference t) |
| Returns the L∞ norm of t (identical to the absolute value for scalar values). More... | |
Common operations and type aliases for scalar arithmetic types.
| T | The scalar value type. |
| typedef T CDPL::Math::ScalarTraits< T >::ValueType |
The scalar value type.
| typedef T CDPL::Math::ScalarTraits< T >::RealType |
The real-valued type (identical to ValueType for scalar traits).
| typedef const T& CDPL::Math::ScalarTraits< T >::ConstReference |
Constant-reference type to a value.
| typedef ScalarTraits<T> CDPL::Math::ScalarTraits< T >::SelfType |
Convenience alias for this traits instantiation.
|
inlinestatic |
Returns the real part of t (identical to t for non-complex scalars).
| t | The value. |
|
inlinestatic |
Returns the imaginary part (always zero for non-complex scalars).
|
inlinestatic |
Returns the complex conjugate of t (identical to t for non-complex scalars).
| t | The value. |
|
inlinestatic |
Returns the absolute value of t (std::abs for signed types, the identity for unsigned types).
| t | The value. |
|
inlinestatic |
Returns the square root of t.
| t | The value. |
|
inlinestatic |
Returns the L1 norm of t (identical to the absolute value for scalar values).
| t | The value. |
|
inlinestatic |
Returns the L2 (Euclidean) norm of t (identical to the absolute value for scalar values).
| t | The value. |
|
inlinestatic |
Returns the L∞ norm of t (identical to the absolute value for scalar values).
| t | The value. |