Logo ROOT   6.08/07
Reference Guide
List of all members | Public Types | Public Member Functions | Private Member Functions | Private Attributes | List of all members
ROOT::Math::MultiDimParamFunctionAdapter Class Reference

MultiDimParamFunctionAdapter class to wrap a one-dimensional parametric function in a multi dimensional parameteric function interface This is used typically in fitting where internally the function is stored as multidimension.

To wrap a non-parametric one-dim function in a multi-dim interface one can use simply a ROOT::Math::WrappedFunction<ROOT::Math::IGenFunction> or ROOT::Math::Functor and ROOT::Math::GradFunctor for gradient functions

This class differs from WrappedParamFunction in the fact that the parameters are not stored in the adapter class and optionally it keeps a cloned and managed copy of the adapter class.

Definition at line 49 of file MultiDimParamFunctionAdapter.h.

Public Types

typedef IParamMultiFunction::BaseFunc BaseFunc
 
- Public Types inherited from ROOT::Math::IParametricFunctionMultiDim
typedef IBaseFunctionMultiDim BaseFunc
 
- Public Types inherited from ROOT::Math::IBaseFunctionMultiDim
typedef IBaseFunctionMultiDim BaseFunc
 

Public Member Functions

 MultiDimParamFunctionAdapter (const IParamFunction &f)
 Constructor from a parametric one dim function interface from a const reference Own the function in this case. More...
 
 MultiDimParamFunctionAdapter (IParamFunction &f)
 Constructor from a parametric one dim function interface from a non-const reference Do not own the function in this case. More...
 
 MultiDimParamFunctionAdapter (const MultiDimParamFunctionAdapter &rhs)
 Copy constructor. More...
 
virtual ~MultiDimParamFunctionAdapter ()
 Destructor (no operations) More...
 
virtual BaseFuncClone () const
 clone More...
 
unsigned int NDim () const
 Retrieve the dimension of the function. More...
 
unsigned int NPar () const
 Return the number of Parameters. More...
 
MultiDimParamFunctionAdapteroperator= (const MultiDimParamFunctionAdapter &rhs)
 Assignment operator. More...
 
const double * Parameters () const
 Access the parameter values. More...
 
void SetParameters (const double *p)
 Set the parameter values. More...
 
- Public Member Functions inherited from ROOT::Math::IParametricFunctionMultiDim
double operator() (const double *x, const double *p) const
 Evaluate function at a point x and for given parameters p. More...
 
- Public Member Functions inherited from ROOT::Math::IBaseFunctionMultiDim
 IBaseFunctionMultiDim ()
 
virtual ~IBaseFunctionMultiDim ()
 virtual destructor More...
 
double operator() (const double *x) const
 Evaluate the function at a point x[]. More...
 
- Public Member Functions inherited from ROOT::Math::IBaseParam
virtual ~IBaseParam ()
 Virtual Destructor (no operations) More...
 
virtual std::string ParameterName (unsigned int i) const
 Return the name of the i-th parameter (starting from zero) Overwrite if want to avoid the default name ("Par_0, Par_1, ...") More...
 

Private Member Functions

double DoEvalPar (const double *x, const double *p) const
 needed by the interface More...
 

Private Attributes

IParamFunctionfFunc
 
bool fOwn
 

#include <Math/MultiDimParamFunctionAdapter.h>

Inheritance diagram for ROOT::Math::MultiDimParamFunctionAdapter:
[legend]

Member Typedef Documentation

◆ BaseFunc

Definition at line 53 of file MultiDimParamFunctionAdapter.h.

Constructor & Destructor Documentation

◆ MultiDimParamFunctionAdapter() [1/3]

ROOT::Math::MultiDimParamFunctionAdapter::MultiDimParamFunctionAdapter ( const IParamFunction f)
inline

Constructor from a parametric one dim function interface from a const reference Own the function in this case.

Definition at line 60 of file MultiDimParamFunctionAdapter.h.

◆ MultiDimParamFunctionAdapter() [2/3]

ROOT::Math::MultiDimParamFunctionAdapter::MultiDimParamFunctionAdapter ( IParamFunction f)
inline

Constructor from a parametric one dim function interface from a non-const reference Do not own the function in this case.

Definition at line 70 of file MultiDimParamFunctionAdapter.h.

◆ MultiDimParamFunctionAdapter() [3/3]

ROOT::Math::MultiDimParamFunctionAdapter::MultiDimParamFunctionAdapter ( const MultiDimParamFunctionAdapter rhs)
inline

Copy constructor.

Different behaviour according if function is owned or not

Definition at line 79 of file MultiDimParamFunctionAdapter.h.

◆ ~MultiDimParamFunctionAdapter()

virtual ROOT::Math::MultiDimParamFunctionAdapter::~MultiDimParamFunctionAdapter ( )
inlinevirtual

Destructor (no operations)

Definition at line 92 of file MultiDimParamFunctionAdapter.h.

Member Function Documentation

◆ Clone()

virtual BaseFunc* ROOT::Math::MultiDimParamFunctionAdapter::Clone ( ) const
inlinevirtual

clone

Implements ROOT::Math::IBaseFunctionMultiDim.

Definition at line 115 of file MultiDimParamFunctionAdapter.h.

◆ DoEvalPar()

double ROOT::Math::MultiDimParamFunctionAdapter::DoEvalPar ( const double *  x,
const double *  p 
) const
inlineprivatevirtual

needed by the interface

Implements ROOT::Math::IParametricFunctionMultiDim.

Definition at line 134 of file MultiDimParamFunctionAdapter.h.

◆ NDim()

unsigned int ROOT::Math::MultiDimParamFunctionAdapter::NDim ( ) const
inlinevirtual

Retrieve the dimension of the function.

Implements ROOT::Math::IBaseFunctionMultiDim.

Definition at line 128 of file MultiDimParamFunctionAdapter.h.

◆ NPar()

unsigned int ROOT::Math::MultiDimParamFunctionAdapter::NPar ( ) const
inlinevirtual

Return the number of Parameters.

Implements ROOT::Math::IBaseParam.

Definition at line 126 of file MultiDimParamFunctionAdapter.h.

◆ operator=()

MultiDimParamFunctionAdapter& ROOT::Math::MultiDimParamFunctionAdapter::operator= ( const MultiDimParamFunctionAdapter rhs)
inline

Assignment operator.

Definition at line 100 of file MultiDimParamFunctionAdapter.h.

◆ Parameters()

const double* ROOT::Math::MultiDimParamFunctionAdapter::Parameters ( ) const
inlinevirtual

Access the parameter values.

Implements ROOT::Math::IBaseParam.

Definition at line 122 of file MultiDimParamFunctionAdapter.h.

◆ SetParameters()

void ROOT::Math::MultiDimParamFunctionAdapter::SetParameters ( const double *  p)
inlinevirtual

Set the parameter values.

Parameters
pvector of doubles containing the parameter values.

to be defined: can user change number of params ? At the moment no.

Implements ROOT::Math::IBaseParam.

Definition at line 124 of file MultiDimParamFunctionAdapter.h.

Member Data Documentation

◆ fFunc

IParamFunction* ROOT::Math::MultiDimParamFunctionAdapter::fFunc
private

Definition at line 142 of file MultiDimParamFunctionAdapter.h.

◆ fOwn

bool ROOT::Math::MultiDimParamFunctionAdapter::fOwn
private

Definition at line 141 of file MultiDimParamFunctionAdapter.h.


The documentation for this class was generated from the following file: