13 #ifndef ROOT_Math_OneDimFunctionAdapter
14 #define ROOT_Math_OneDimFunctionAdapter
28 template<
class MultiFuncType>
31 static double F (MultiFuncType
f,
const double *
x,
const double * = 0 ) {
55 template <
class MultiFuncType = const ROOT::Math::IMultiGenFunction &>
67 fX( const_cast<double *>(x) ),
116 template<
class Iterator>
117 void SetX(Iterator begin, Iterator end) {
118 if (
fOwn) std::copy(begin, end,
fX);
135 SetX( const_cast<double *>(x) );
161 if (
this == &rhs)
return *
this;
212 template <
class ParamFuncType = ROOT::Math::IParamMultiFunction &>
253 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)
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...
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...
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.
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.