test
CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
Exponential.h
Go to the documentation of this file.
1 #ifndef PhysicsTools_Utilities_Exponential_h
2 #define PhysicsTools_Utilities_Exponential_h
4 #include <boost/shared_ptr.hpp>
5 #include <cmath>
6 
7 namespace funct {
8 
9  struct Exponential {
10  Exponential(const Parameter & l) : lambda(l.ptr()) { }
11  Exponential(boost::shared_ptr<double> l) : lambda(l) { }
12  Exponential(double l) : lambda(new double(l)) { }
13  double operator()(double x) const { return std::exp((*lambda)*x); }
14  boost::shared_ptr<double> lambda;
15  };
16 
17 }
18 
19 #endif
Exponential(const Parameter &l)
Definition: Exponential.h:10
double operator()(double x) const
Definition: Exponential.h:13
boost::shared_ptr< double > lambda
Definition: Exponential.h:14
Exponential(double l)
Definition: Exponential.h:12
Exponential(boost::shared_ptr< double > l)
Definition: Exponential.h:11