26#ifndef SCIMATH_WRAPPERDATA_H
27#define SCIMATH_WRAPPERDATA_H
30#include <casacore/casa/aips.h>
31#include <casacore/scimath/Functionals/WrapperBase.h>
64template <
class T,
class U,
class V, Bool hasX, Bool hasParam>
90#define WrapperData_TT WrapperData
102 typedef WrapperData_TT<T,T,T,True,True>
myData;
129 T (*pf_p)(
const T&,
const T&);
147#define WrapperData_VT WrapperData
168 for (
uInt i=0; i<ndim_p; ++i) arg_p[i] = x[i];
169 return pf_p(arg_p, par[0]); }
188#define WrapperData_TV WrapperData
230#define WrapperData_VV WrapperData
253 for (
uInt i=0; i<ndim_p; ++i) arg_p[i] = x[i];
254 return pf_p(arg_p, par); }
273#define WrapperData_FT WrapperData
285 typedef WrapperData_FT<T,T,T,False,True>
myData;
293 if (pf_p)
return pf_p(par[0]);
312#define WrapperData_FV WrapperData
332 if (pf_p)
return pf_p(par);
351#define WrapperData_TF WrapperData
363 typedef WrapperData_TF<T,T,T,True,False>
myData;
392#define WrapperData_VF WrapperData
413 for (
uInt i=0; i<ndim_p; ++i) arg_p[i] = x[i];
414 return pf_p(arg_p); }
433#define WrapperData_FF WrapperData
445 typedef WrapperData_FF<T,T,T,True,False>
myData;
453 if (pf_p)
return pf_p();
Vector< T > arg_p
Vector argument interface.
uInt ndim_p
Dimensionality.
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)
myData & operator=(const myData &other)
Specialization for calls with no arguments and parameter.
virtual ~WrapperData_FT()
myData & operator=(const myData &other)
virtual T eval(typename Function< T >::FunctionArg, const Vector< T > &par) const
Evaluate the function at x.
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 > &))
myData & operator=(const myData &other)
virtual ~WrapperData_FV()
WrapperData_FV(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.
myData & operator=(const myData &other)
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.
WrapperData_TF(const myData &other)
Specialization for calls with argument and parameter.
WrapperData_TT< T, T, T, True, True > myData
myData & operator=(const myData &other)
virtual ~WrapperData_TT()
Destructor.
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)
myData & operator=(const myData &other)
WrapperData_TV(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.
myData & operator=(const myData &other)
virtual ~WrapperData_VF()
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)
myData & operator=(const myData &other)
WrapperData_VT< T, Vector< T >, T, True, True > myData
virtual ~WrapperData_VT()
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