13#ifndef ROOT_Math_OneDimFunctionAdapter
14#define ROOT_Math_OneDimFunctionAdapter
28template<
class MultiFuncType>
31 static double F (MultiFuncType
f,
const double *
x,
const double * =
nullptr ) {
55template <
class MultiFuncType = const ROOT::Math::IMultiGenFunction &>
73 assert(
fX !=
nullptr);
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 &>
227 assert(
fX !=
nullptr);
253 double *
p =
const_cast<double *
>(
fParams);
winID h TVirtualViewer3D TVirtualGLPainter p
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, unsigned int dim=1, unsigned int icoord=0, const double *p=nullptr)
Constructor from the function object , dimension of the function and and coordinate we want to adapt.
OneDimMultiFunctionAdapter(const OneDimMultiFunctionAdapter &rhs)
void SetCoord(int icoord)
OneDimMultiFunctionAdapter & operator=(const OneDimMultiFunctionAdapter &rhs)
void SetX(double *x)
set pointer without copying the values
~OneDimMultiFunctionAdapter() override
Destructor (no operations)
OneDimMultiFunctionAdapter * Clone() const override
clone
OneDimMultiFunctionAdapter(MultiFuncType f, const double *x, unsigned int icoord=0, const double *p=nullptr)
Constructor from the function object , pointer to an external array of x values and coordinate we wan...
void SetX(Iterator begin, Iterator end)
Set X values in case vector is own, iterator size must match previous set dimension.
double DoEval(double x) const override
evaluate function at the values x[] given in the constructor and as function of the coordinate fCoord...
void SetX(const double *x)
set values
OneDimParamFunctionAdapter class to wrap a multi-dim parametric function in one dimensional one.
double DoEval(double x) const override
evaluate function at the values x[] given in the constructor and as function of the coordinate fCoord...
~OneDimParamFunctionAdapter() override
Destructor (no operations)
OneDimParamFunctionAdapter * Clone() const override
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.
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=nullptr)
static double F(MultiFuncType f, const double *x, const double *=nullptr)