28 #ifndef SCIMATH_NUMERICTRAITS_H
29 #define SCIMATH_NUMERICTRAITS_H
32 #include <casacore/casa/aips.h>
33 #include <casacore/casa/BasicSL/Complex.h>
249 #if defined NumericTraits_F
250 #undef NumericTraits_F
252 #define NumericTraits_F NumericTraits
284 #undef NumericTraits_F
286 #if defined NumericTraits_D
287 #undef NumericTraits_D
289 #define NumericTraits_D NumericTraits
321 #undef NumericTraits_D
323 #if defined NumericTraits_C
324 #undef NumericTraits_C
326 #define NumericTraits_C NumericTraits
353 return ((n%2 == 0) ? other.real() : other.imag()); }
356 other = (n%2 == 0) ?
value_type(val, other.imag()) :
360 #undef NumericTraits_C
362 #if defined NumericTraits_DC
363 #undef NumericTraits_DC
365 #define NumericTraits_DC NumericTraits
392 return ((n%2 == 0) ? other.real() : other.imag()); }
395 other = (n%2 == 0) ?
value_type(val, other.imag()) :
399 #undef NumericTraits_DC
static void setImag(value_type &other, const BaseType &val)
Set the imaginary part of a complex value only (a NOP for reals)
static void setValue(value_type &other, const BaseType &val, const uInt n)
Set the nsize()-th numeric value.
static BaseType getValue(const value_type &other, const uInt n)
Get the nsize()-th numeric value.
DComplex PrecisionType
Higher precision type (Float->Double)
static const Double & epsilon
Relevant minimum and maximum numbers.
Float ConjugateType
Conjugate (real<->complex) type.
static const Double & minimum
static const Double & maximum
static uInt size()
Number of relevant numeric values.
Complex value_type
Template argument.
Float BaseType
Numeric type.
static const Double & minimum
DComplex value_type
Template argument.
static void setImag(value_type &other, const BaseType &val)
Set the imaginary part of a complex value only (a NOP for reals)
Double BaseType
Numeric type.
static void setValue(value_type &other, const BaseType &val, const uInt n)
Set the nsize()-th numeric value.
static uInt size()
Number of relevant numeric values.
static const Double & epsilon
Relevant minimum and maximum numbers.
DComplex PrecisionType
Higher precision type (Float->Double)
static BaseType getValue(const value_type &other, const uInt n)
Get the nsize()-th numeric value.
static const Double & maximum
Double ConjugateType
Conjugate (real<->complex) type.
static const Double & minimum
Double PrecisionType
Higher precision type (Float->Double)
Double value_type
Template argument.
DComplex ConjugateType
Conjugate (real<->complex) type.
static uInt size()
Number of relevant numeric values.
static BaseType getValue(const value_type &other, const uInt)
Get the nsize()-th numeric value.
static void setValue(value_type &other, const BaseType &val, const uInt)
Set the nsize()-th numeric value.
static void setImag(value_type &, const BaseType &)
Set the imaginary part of a complex value only (a NOP for reals)
static const Double & maximum
Double BaseType
Numeric type.
static const Double & epsilon
Relevant minimum and maximum numbers.
static BaseType getValue(const value_type &other, const uInt)
Get the nsize()-th numeric value.
static const Double & minimum
Float value_type
Template argument.
Float BaseType
Numeric type.
static const Double & epsilon
Relevant minimum and maximum numbers.
Double PrecisionType
Higher precision type (Float->Double)
Complex ConjugateType
Conjugate (real<->complex) type.
static const Double & maximum
static void setValue(value_type &other, const BaseType &val, const uInt)
Set the nsize()-th numeric value.
static uInt size()
Number of relevant numeric values.
static void setImag(value_type &, const BaseType &)
Set the imaginary part of a complex value only (a NOP for reals)
static void setValue(T &, const BaseType &, const uInt)
Set the nsize()-th numeric value.
Char BaseType
Numeric type.
static void setImag(T &, const BaseType &)
Set the imaginary part of a complex value only (a NOP for reals)
static const Double & minimum
Char ConjugateType
Conjugate (real<->complex) type.
static const Double & maximum
Char PrecisionType
Higher precision type (Float->Double)
static uInt size()
Number of relevant numeric values.
T value_type
Template argument.
static BaseType getValue(const T &, const uInt)
Get the nsize()-th numeric value.
static const Double & epsilon
Relevant minimum and maximum numbers.
std::complex< Float > Complex
std::complex< Double > DComplex
this file contains all the compiler specific defines