CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
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

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

Definition at line 13 of file RootFunctionAdapter.h.

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

Member Function Documentation

template<typename F, unsigned int args>
void root::helper::RootFunctionAdapter< F, args >::addParameter ( const std::shared_ptr< double > &  par)
inline
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_
template<typename F, unsigned int args>
double root::helper::RootFunctionAdapter< F, args >::operator() ( const double *  var) const
inline
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

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