28 #ifndef SCIMATH_FUNCTIONTRAITS_H
29 #define SCIMATH_FUNCTIONTRAITS_H
32 #include <casacore/casa/aips.h>
33 #include <casacore/scimath/Mathematics/AutoDiff.h>
34 #include <casacore/scimath/Mathematics/AutoDiffA.h>
35 #include <casacore/scimath/Mathematics/AutoDiffX.h>
154 static const T &
getValue(
const T &in) {
return in; }
157 const uInt) { out = val; }
163 #define FunctionTraits_P FunctionTraits
187 const uInt i) { out =
Type(val, nder, i); }
190 #undef FunctionTraits_P
192 #define FunctionTraits_PA FunctionTraits
216 const uInt i) { out =
Type(val, nder, i); }
219 #undef FunctionTraits_PA
221 #define FunctionTraits_PX FunctionTraits
245 const uInt i) { out =
Type(val, nder, i); }
248 #undef FunctionTraits_PX
#define FunctionTraits_PA
#define FunctionTraits_PX
T & value()
Returns the value of the function.
T BaseType
Template base type.
AutoDiffA< T > ArgType
Type for arguments.
static void setValue(Type &out, const T &val, const uInt nder, const uInt i)
Set a value (and possible derivative)
AutoDiffA< T > DiffType
Default type for differentiation.
AutoDiffA< T > Type
Actual template type.
AutoDiffA< T > ParamType
Type for parameters.
FunctionTraits_PA< T >::NumericType NumericType
Template numeric type.
static const T & getValue(const Type &in)
Get the value.
AutoDiffX< T > Type
Actual template type.
T ParamType
Type for parameters.
T BaseType
Template base type.
AutoDiffX< T > DiffType
Default type for differentiation.
FunctionTraits_PX< T >::NumericType NumericType
Template numeric type.
AutoDiffX< T > ArgType
Type for arguments.
static void setValue(Type &out, const T &val, const uInt nder, const uInt i)
Set a value (and possible derivative)
static const T & getValue(const Type &in)
Get the value.
AutoDiff< T > Type
Actual template type.
static const T & getValue(const Type &in)
Get the value.
static void setValue(Type &out, const T &val, const uInt nder, const uInt i)
Set a value (and possible derivative)
AutoDiff< T > DiffType
Default type for differentiation.
T ArgType
Type for arguments.
AutoDiff< T > ParamType
Type for parameters.
T BaseType
Template base type.
FunctionTraits_P< T >::NumericType NumericType
Template numeric type.
static void setValue(T &out, const T &val, const uInt, const uInt)
Set a value (and possible derivative)
AutoDiff< T > DiffType
Default type for differentiation.
T ArgType
Type for arguments.
static const T & getValue(const T &in)
Get the value.
T Type
Actual template type.
T BaseType
Template base type.
T ParamType
Type for parameters.
T NumericType
Numeric type of template.
this file contains all the compiler specific defines