28 #ifndef SCIMATH_WRAPPERDATA_H
29 #define SCIMATH_WRAPPERDATA_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
WrapperData_VF(T(*f)(const Vector< T > &), uInt dim=1)
Specialization for calls with no arguments and parameter.
WrapperData_VV(T(*f)(const Vector< T > &, const Vector< T > &), uInt dim=1)
virtual ~WrapperData_FF()
virtual T eval(typename Function< T >::FunctionArg, const Vector< T > &par) const
Evaluate the function at x.
WrapperData_VT< T, Vector< T >, T, True, True > myData
WrapperData_FF< T, T, T, True, False > myData
virtual T eval(typename Function< T >::FunctionArg x, const Vector< T > &par) const
Evaluate the function at x.
WrapperData_FV< T, T, Vector< T >, False, True > myData
virtual T eval(typename Function< T >::FunctionArg x, const Vector< T > &) const
Evaluate the function at x.
Specialization for calls with argument and parameters.
WrapperData_TV< T, T, Vector< T >, True, True > myData
virtual ~WrapperData_FT()
Specialization for calls with argument and no parameters.
PtrHolder< T > & operator=(const PtrHolder< T > &other)
WrapperData_TT< T, T, T, True, True > myData
Specialization for calls with argument and parameter.
virtual T eval(typename Function< T >::FunctionArg x, const Vector< T > &) const
Evaluate the function at x.
virtual ~WrapperData_TV()
virtual ~WrapperData_VV()
Aid in constructing function objects from C++ functions.
Specialization for calls with argument and parameters.
WrapperData_VF< T, Vector< T >, T, True, False > myData
virtual T eval(typename Function< T >::FunctionArg x, const Vector< T > &par) const
Evaluate the function at x.
Numerical functional interface class.
virtual T eval(typename Function< T >::FunctionArg, const Vector< T > &par) const
Evaluate the function at x.
WrapperData_TF< T, T, T, True, False > myData
WrapperData_TT(T(*f)(const T &, const T &), uInt dim=1)
Standard constructor.
virtual T eval(typename Function< T >::FunctionArg, const Vector< T > &) const
Evaluate the function at x.
virtual ~WrapperData_TF()
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()
Default constructor: to allow arrays of functions.
virtual ~WrapperData_VF()
virtual T eval(typename Function< T >::FunctionArg x, const Vector< T > &par) const
Evaluate the function at x.
Specialization for calls with argument and no parameters.
virtual ~WrapperData_VT()
Specialization for calls with no arguments and parameters.
WrapperData_VT(T(*f)(const Vector< T > &, const T &), uInt dim=1)
virtual ~WrapperData_TT()
Destructor.
WrapperData_FT(T(*f)(const T &))
virtual ~WrapperData()
Destructor.
WrapperData_TV(T(*f)(const T &, const Vector< T > &), uInt dim=1)
WrapperData_FT< T, T, T, False, True > myData
virtual T eval(typename Function< T >::FunctionArg, const V &) const
Evaluate the function at x.
virtual ~WrapperData_FV()
Specialization for calls with argument and parameter.
Aid in constructing function objects from C++ functions.
WrapperData_FV(T(*f)(const Vector< T > &))
WrapperData_TF(T(*f)(const T &), uInt dim=1)