13#ifndef ROOT_Math_OneDimFunctionAdapter
14#define ROOT_Math_OneDimFunctionAdapter
28template<
class MultiFuncType>
31 static double F (MultiFuncType
f,
const double *
x,
const double * = 0 ) {
55template <
class MultiFuncType = const ROOT::Math::IMultiGenFunction &>
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;
212template <
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...
OneDimMultiFunctionAdapter class to wrap a multidimensional function in one dimensional one.
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(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.
virtual OneDimMultiFunctionAdapter * Clone() const
clone
OneDimMultiFunctionAdapter(const OneDimMultiFunctionAdapter &rhs)
void SetCoord(int icoord)
OneDimMultiFunctionAdapter & operator=(const OneDimMultiFunctionAdapter &rhs)
virtual ~OneDimMultiFunctionAdapter()
Destructor (no operations)
void SetX(double *x)
set pointer without copying the values
double DoEval(double x) const
evaluate function at the values x[] given in the constructor and as function of the coordinate fCoord...
void SetX(Iterator begin, Iterator end)
Set X values in case vector is own, iterator size must match previous set dimension.
void SetX(const double *x)
set values
OneDimParamFunctionAdapter class to wrap a multi-dim parameteric function in one dimensional one.
virtual OneDimParamFunctionAdapter * Clone() const
clone
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.
double DoEval(double x) const
evaluate function at the values x[] given in the constructor and as function of the coordinate fCoord...
~OneDimParamFunctionAdapter()
Destructor (no operations)
Namespace for new Math classes and functions.
tbb::task_arena is an alias of tbb::interface7::task_arena, which doesn't allow to forward declare tb...
static double F(const ROOT::Math::IParamMultiFunction &f, const double *x, const double *p=0)
static double F(MultiFuncType f, const double *x, const double *=0)