13 #ifndef ROOT_Math_OneDimFunctionAdapter
14 #define ROOT_Math_OneDimFunctionAdapter
16 #ifndef ROOT_Math_IFunction
19 #ifndef ROOT_Math_IParamFunction
32 template<
class MultiFuncType>
35 static double F (MultiFuncType
f,
const double *
x,
const double * = 0 ) {
59 template <
class MultiFuncType = const ROOT::Math::IMultiGenFunction &>
120 template<
class Iterator>
121 void SetX(Iterator begin, Iterator end) {
122 if (
fOwn) std::copy(begin, end,
fX);
139 SetX( const_cast<double *>(x) );
165 if (
this == &rhs)
return *
this;
216 template <
class ParamFuncType = ROOT::Math::IParamMultiFunction &>
257 double * p =
const_cast<double *
>(
fParams);
Interface (abstract class) for generic functions objects of one-dimension Provides a method to evalua...
static double F(MultiFuncType f, const double *x, const double *=0)
Namespace for new ROOT classes and functions.
OneDimMultiFunctionAdapter & operator=(const OneDimMultiFunctionAdapter &rhs)
virtual ~OneDimMultiFunctionAdapter()
Destructor (no operations)
double DoEval(double x) const
evaluate function at the values x[] given in the constructor and as function of the coordinate fCoord...
ClassImp(TIterator) Bool_t TIterator return false
Compare two iterator objects.
static double F(const ROOT::Math::IParamMultiFunction &f, const double *x, const double *p=0)
OneDimMultiFunctionAdapter class to wrap a multidimensional function in one dimensional one...
~OneDimParamFunctionAdapter()
Destructor (no operations)
OneDimMultiFunctionAdapter(MultiFuncType f, const double *x, unsigned int icoord=0, const double *p=0)
Constructor from the function object , pointer to an external array of x values and coordinate we wan...
OneDimMultiFunctionAdapter(const OneDimMultiFunctionAdapter &rhs)
double DoEval(double x) const
evaluate function at the values x[] given in the constructor and as function of the coordinate fCoord...
IParamFunction interface (abstract class) describing multi-dimensional parameteric functions It is a ...
virtual OneDimParamFunctionAdapter * Clone() const
clone
virtual OneDimMultiFunctionAdapter * Clone() const
clone
OneDimMultiFunctionAdapter(MultiFuncType f, unsigned int dim=1, unsigned int icoord=0, const double *p=0)
Constructor from the function object , dimension of the function and and coordinate we want to adapt...
OneDimParamFunctionAdapter class to wrap a multi-dim parameteric function in one dimensional one...
void SetX(const double *x)
set values
void SetX(Iterator begin, Iterator end)
Set X values in case vector is own, iterator size must match previous set dimension.
Namespace for new Math classes and functions.
void SetX(double *x)
set pointer without copying the values
void SetCoord(int icoord)
OneDimParamFunctionAdapter(ParamFuncType f, const double *x, const double *p, unsigned int ipar=0)
Constructor from the function object , x value and coordinate we want to adapt.