CMS 3D CMS Logo

List of all members | Public Member Functions | Private Attributes
root::helper::RootFunctionAdapter< F, args > Struct Template Reference

#include <RootFunctionAdapter.h>

Public Member Functions

void addParameter (const std::shared_ptr< double > &par)
 
size_t numberOfParameters () const
 
double operator() (const double *var) const
 
 RootFunctionAdapter ()
 
 RootFunctionAdapter (F &f)
 
void setParameters (const double *pars)
 

Private Attributes

Ff_
 
std::vector< std::shared_ptr< double > > pars_
 

Detailed Description

template<typename F, unsigned int args>
struct root::helper::RootFunctionAdapter< F, args >

Definition at line 12 of file RootFunctionAdapter.h.

Constructor & Destructor Documentation

◆ RootFunctionAdapter() [1/2]

template<typename F, unsigned int args>
root::helper::RootFunctionAdapter< F, args >::RootFunctionAdapter ( )
inline

Definition at line 13 of file RootFunctionAdapter.h.

◆ RootFunctionAdapter() [2/2]

template<typename F, unsigned int args>
root::helper::RootFunctionAdapter< F, args >::RootFunctionAdapter ( F f)
inline

Definition at line 14 of file RootFunctionAdapter.h.

14 : f_(&f) {}
double f[11][100]

Member Function Documentation

◆ addParameter()

template<typename F, unsigned int args>
void root::helper::RootFunctionAdapter< F, args >::addParameter ( const std::shared_ptr< double > &  par)
inline

◆ numberOfParameters()

template<typename F, unsigned int args>
size_t root::helper::RootFunctionAdapter< F, args >::numberOfParameters ( ) const
inline

Definition at line 22 of file RootFunctionAdapter.h.

References root::helper::RootFunctionAdapter< F, args >::pars_.

22 { return pars_.size(); }
std::vector< std::shared_ptr< double > > pars_

◆ operator()()

template<typename F, unsigned int args>
double root::helper::RootFunctionAdapter< F, args >::operator() ( const double *  var) const
inline

◆ setParameters()

template<typename F, unsigned int args>
void root::helper::RootFunctionAdapter< F, args >::setParameters ( const double *  pars)
inline

Definition at line 16 of file RootFunctionAdapter.h.

References mps_fire::i, and root::helper::RootFunctionAdapter< F, args >::pars_.

16  {
17  for (size_t i = 0; i < pars_.size(); ++i) {
18  *pars_[i] = pars[i];
19  }
20  }
std::vector< std::shared_ptr< double > > pars_

Member Data Documentation

◆ f_

template<typename F, unsigned int args>
F* root::helper::RootFunctionAdapter< F, args >::f_
private

◆ pars_

template<typename F, unsigned int args>
std::vector<std::shared_ptr<double> > root::helper::RootFunctionAdapter< F, args >::pars_
private