28 #ifndef SCIMATH_WRAPPERDATA_H
29 #define SCIMATH_WRAPPERDATA_H
32 #include <casacore/casa/aips.h>
33 #include <casacore/scimath/Functionals/WrapperBase.h>
66 template <
class T,
class U,
class V, Bool hasX, Bool hasParam>
92 #define WrapperData_TT WrapperData
131 T (*pf_p)(
const T&,
const T&);
146 #undef WrapperData_TT
149 #define WrapperData_VT WrapperData
170 for (
uInt i=0; i<ndim_p; ++i) arg_p[i] = x[i];
171 return pf_p(arg_p, par[0]); }
187 #undef WrapperData_VT
190 #define WrapperData_TV WrapperData
229 #undef WrapperData_TV
232 #define WrapperData_VV WrapperData
255 for (
uInt i=0; i<ndim_p; ++i) arg_p[i] = x[i];
256 return pf_p(arg_p, par); }
272 #undef WrapperData_VV
275 #define WrapperData_FT WrapperData
295 if (pf_p)
return pf_p(par[0]);
311 #undef WrapperData_FT
314 #define WrapperData_FV WrapperData
334 if (pf_p)
return pf_p(par);
350 #undef WrapperData_FV
353 #define WrapperData_TF WrapperData
391 #undef WrapperData_TF
394 #define WrapperData_VF WrapperData
415 for (
uInt i=0; i<ndim_p; ++i) arg_p[i] = x[i];
416 return pf_p(arg_p); }
432 #undef WrapperData_VF
435 #define WrapperData_FF WrapperData
447 typedef WrapperData_FF<T,T,T,True,False>
myData;
455 if (pf_p)
return pf_p();
471 #undef WrapperData_FF
const ArgType * FunctionArg
myData & operator=(const myData &other)
WrapperData_FF< T, T, T, True, False > myData
virtual ~WrapperData_FF()
virtual T eval(typename Function< T >::FunctionArg, const Vector< T > &) const
Evaluate the function at x.
WrapperData_FF(const myData &other)
Specialization for calls with no arguments and parameter.
virtual ~WrapperData_FT()
virtual T eval(typename Function< T >::FunctionArg, const Vector< T > &par) const
Evaluate the function at x.
myData & operator=(const myData &other)
WrapperData_FT< T, T, T, False, True > myData
WrapperData_FT(const myData &other)
WrapperData_FT(T(*f)(const T &))
Specialization for calls with no arguments and parameters.
WrapperData_FV< T, T, Vector< T >, False, True > myData
WrapperData_FV(T(*f)(const Vector< T > &))
virtual ~WrapperData_FV()
WrapperData_FV(const myData &other)
myData & operator=(const myData &other)
virtual T eval(typename Function< T >::FunctionArg, const Vector< T > &par) const
Evaluate the function at x.
Specialization for calls with argument and no parameters.
WrapperData_TF< T, T, T, True, False > myData
virtual ~WrapperData_TF()
WrapperData_TF(T(*f)(const T &), uInt dim=1)
virtual T eval(typename Function< T >::FunctionArg x, const Vector< T > &) const
Evaluate the function at x.
myData & operator=(const myData &other)
WrapperData_TF(const myData &other)
Specialization for calls with argument and parameter.
WrapperData_TT< T, T, T, True, True > myData
virtual ~WrapperData_TT()
Destructor.
myData & operator=(const myData &other)
WrapperData_TT(T(*f)(const T &, const T &), uInt dim=1)
Standard constructor.
virtual T eval(typename Function< T >::FunctionArg x, const Vector< T > &par) const
Evaluate the function at x.
WrapperData_TT(const myData &other)
Copy constructor and assignment (not implemented)
Specialization for calls with argument and parameters.
WrapperData_TV< T, T, Vector< T >, True, True > myData
virtual T eval(typename Function< T >::FunctionArg x, const Vector< T > &par) const
Evaluate the function at x.
virtual ~WrapperData_TV()
WrapperData_TV(T(*f)(const T &, const Vector< T > &), uInt dim=1)
WrapperData_TV(const myData &other)
myData & operator=(const myData &other)
Specialization for calls with argument and no parameters.
WrapperData_VF(const myData &other)
virtual T eval(typename Function< T >::FunctionArg x, const Vector< T > &) const
Evaluate the function at x.
virtual ~WrapperData_VF()
myData & operator=(const myData &other)
WrapperData_VF(T(*f)(const Vector< T > &), uInt dim=1)
WrapperData_VF< T, Vector< T >, T, True, False > myData
Specialization for calls with argument and parameter.
virtual T eval(typename Function< T >::FunctionArg x, const Vector< T > &par) const
Evaluate the function at x.
WrapperData_VT(T(*f)(const Vector< T > &, const T &), uInt dim=1)
WrapperData_VT(const myData &other)
WrapperData_VT< T, Vector< T >, T, True, True > myData
virtual ~WrapperData_VT()
myData & operator=(const myData &other)
Specialization for calls with argument and parameters.
virtual ~WrapperData_VV()
WrapperData_VV(const myData &other)
WrapperData_VV< T, Vector< T >, Vector< T >, True, True > myData
virtual T eval(typename Function< T >::FunctionArg x, const Vector< T > &par) const
Evaluate the function at x.
WrapperData_VV(T(*f)(const Vector< T > &, const Vector< T > &), uInt dim=1)
myData & operator=(const myData &other)
virtual T eval(typename Function< T >::FunctionArg, const V &) const
Evaluate the function at x.
WrapperData()
Default constructor: to allow arrays of functions.
virtual ~WrapperData()
Destructor.
this file contains all the compiler specific defines