ROOT
6.07/01
Reference Guide
|
OneDimMultiFunctionAdapter class to wrap a multidimensional function in one dimensional one.
Given a f(x1,x2,x3,....xn) transforms in a f( x_i) given the coordinate intex i and the vector x[] of the coordinates. It provides the possibility to copy and own the data array of the coordinates or to maintain internally a pointer to an external array for being more efficient. In this last case the user must garantee the life of the given passed pointer
Definition at line 60 of file OneDimFunctionAdapter.h.
Public Member Functions | |
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 want to adapt. More... | |
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. More... | |
virtual | ~OneDimMultiFunctionAdapter () |
Destructor (no operations) More... | |
virtual OneDimMultiFunctionAdapter * | Clone () const |
clone More... | |
template<class Iterator > | |
void | SetX (Iterator begin, Iterator end) |
Set X values in case vector is own, iterator size must match previous set dimension. More... | |
void | SetX (double *x) |
set pointer without copying the values More... | |
void | SetX (const double *x) |
set values More... | |
void | SetCoord (int icoord) |
OneDimMultiFunctionAdapter (const OneDimMultiFunctionAdapter &rhs) | |
Public Member Functions inherited from ROOT::Math::IBaseFunctionOneDim | |
IBaseFunctionOneDim () | |
virtual | ~IBaseFunctionOneDim () |
virtual destructor More... | |
double | operator() (double x) const |
Evaluate the function at a point x Use the a pure virtual private method DoEval which must be implemented by sub-classes. More... | |
double | operator() (const double *x) const |
Evaluate the function at a point x[]. More... | |
Private Member Functions | |
OneDimMultiFunctionAdapter & | operator= (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. More... | |
Private Attributes | |
MultiFuncType | fFunc |
double * | fX |
const double * | fParams |
unsigned int | fCoord |
unsigned int | fDim |
bool | fOwn |
Additional Inherited Members | |
Public Types inherited from ROOT::Math::IBaseFunctionOneDim | |
typedef IBaseFunctionOneDim | BaseFunc |
#include <Math/OneDimFunctionAdapter.h>
|
inline |
Constructor from the function object , pointer to an external array of x values and coordinate we want to adapt.
Definition at line 69 of file OneDimFunctionAdapter.h.
Referenced by ROOT::Math::OneDimMultiFunctionAdapter< MultiFuncType >::Clone().
|
inline |
Constructor from the function object , dimension of the function and and coordinate we want to adapt.
The coordinate cached vector is created inside and eventually the values must be passed later with the SetX which will copy them
Definition at line 85 of file OneDimFunctionAdapter.h.
|
inlinevirtual |
Destructor (no operations)
Definition at line 99 of file OneDimFunctionAdapter.h.
|
inline |
Definition at line 146 of file OneDimFunctionAdapter.h.
|
inlinevirtual |
clone
Implements ROOT::Math::IBaseFunctionOneDim.
Definition at line 104 of file OneDimFunctionAdapter.h.
|
inlineprivatevirtual |
evaluate function at the values x[] given in the constructor and as function of the coordinate fCoord.
Implements ROOT::Math::IBaseFunctionOneDim.
Definition at line 173 of file OneDimFunctionAdapter.h.
|
inlineprivate |
Definition at line 164 of file OneDimFunctionAdapter.h.
|
inline |
Definition at line 143 of file OneDimFunctionAdapter.h.
Referenced by ROOT::Fit::FitUtil::EvaluateChi2Effective().
|
inline |
Set X values in case vector is own, iterator size must match previous set dimension.
Definition at line 121 of file OneDimFunctionAdapter.h.
Referenced by ROOT::Math::IntegratorOneDim::SetFunction(), and ROOT::Math::OneDimMultiFunctionAdapter< MultiFuncType >::SetX().
|
inline |
set pointer without copying the values
Definition at line 129 of file OneDimFunctionAdapter.h.
|
inline |
set values
Definition at line 136 of file OneDimFunctionAdapter.h.
|
private |
|
private |
|
private |
Definition at line 194 of file OneDimFunctionAdapter.h.
Referenced by ROOT::Math::OneDimMultiFunctionAdapter< MultiFuncType >::Clone(), and ROOT::Math::OneDimMultiFunctionAdapter< MultiFuncType >::DoEval().
|
private |
Definition at line 199 of file OneDimFunctionAdapter.h.
Referenced by ROOT::Math::OneDimMultiFunctionAdapter< MultiFuncType >::Clone(), ROOT::Math::OneDimMultiFunctionAdapter< MultiFuncType >::DoEval(), ROOT::Math::OneDimMultiFunctionAdapter< MultiFuncType >::OneDimMultiFunctionAdapter(), ROOT::Math::OneDimMultiFunctionAdapter< MultiFuncType >::SetX(), and ROOT::Math::OneDimMultiFunctionAdapter< MultiFuncType >::~OneDimMultiFunctionAdapter().
|
private |
Definition at line 196 of file OneDimFunctionAdapter.h.
Referenced by ROOT::Math::OneDimMultiFunctionAdapter< MultiFuncType >::Clone(), and ROOT::Math::OneDimMultiFunctionAdapter< MultiFuncType >::DoEval().
|
mutableprivate |
Definition at line 195 of file OneDimFunctionAdapter.h.
Referenced by ROOT::Math::OneDimMultiFunctionAdapter< MultiFuncType >::Clone(), ROOT::Math::OneDimMultiFunctionAdapter< MultiFuncType >::DoEval(), ROOT::Math::OneDimMultiFunctionAdapter< MultiFuncType >::OneDimMultiFunctionAdapter(), ROOT::Math::OneDimMultiFunctionAdapter< MultiFuncType >::SetX(), and ROOT::Math::OneDimMultiFunctionAdapter< MultiFuncType >::~OneDimMultiFunctionAdapter().