CMS 3D CMS Logo

Public Member Functions | Private Attributes

root::helper::RootFunctionAdapter< F, args > Struct Template Reference

#include <RootFunctionAdapter.h>

List of all members.

Public Member Functions

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

Private Attributes

F * f_
std::vector< boost::shared_ptr
< double > > 
pars_

Detailed Description

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

Definition at line 11 of file RootFunctionAdapter.h.


Constructor & Destructor Documentation

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

Definition at line 12 of file RootFunctionAdapter.h.

: f_(0) { }
template<typename F, unsigned int args>
root::helper::RootFunctionAdapter< F, args >::RootFunctionAdapter ( F &  f) [inline]

Definition at line 13 of file RootFunctionAdapter.h.

: f_(&f) { }

Member Function Documentation

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

Definition at line 14 of file RootFunctionAdapter.h.

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

                                                             {
        pars_.push_back(par);
      }
template<typename F, unsigned int args>
size_t root::helper::RootFunctionAdapter< F, args >::numberOfParameters ( ) const [inline]

Definition at line 25 of file RootFunctionAdapter.h.

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

                                        {
        return pars_.size();
      }
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 17 of file RootFunctionAdapter.h.

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

                                              {
        for(size_t i = 0; i < pars_.size(); ++i) {
          *pars_[i] = pars[i];
        }
      }

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<boost::shared_ptr<double> > root::helper::RootFunctionAdapter< F, args >::pars_ [private]