test
CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
Numerical.h
Go to the documentation of this file.
1 #ifndef PhysicsTools_Utilities_Numerical_h
2 #define PhysicsTools_Utilities_Numerical_h
3 #include <cassert>
4 namespace funct {
5 
6  template<int n> struct Numerical {
7  Numerical() { }
8  Numerical(int m) { assert(m == n); }
9  static const int value = n;
10  double operator()() const { return n; }
11  operator double() const { return n; }
12  double operator()(double) const { return n; }
13  double operator()(double, double) const { return n; }
14  };
15 
16  template<int n> const Numerical<n>& num()
17  { static Numerical<n> c; return c; }
18 
19 }
20 
21 #endif
double operator()(double, double) const
Definition: Numerical.h:13
const Numerical< n > & num()
Definition: Numerical.h:16
assert(m_qm.get())
Numerical(int m)
Definition: Numerical.h:8
static const int value
Definition: Numerical.h:9
double operator()() const
Definition: Numerical.h:10
double operator()(double) const
Definition: Numerical.h:12