CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
NthDerivative.h
Go to the documentation of this file.
1 #ifndef PhysicsTools_Utilities_NthDerivative_h
2 #define PhysicsTools_Utilities_NthDerivative_h
3 
5 
6 namespace funct {
7 
8  template<unsigned n, typename X, typename F>
9  struct NthDerivative {
10  typedef typename Derivative<X, typename NthDerivative<n - 1, X, F>::type>::type type;
11  inline static type get(const F& f) {
12  return derivative<X>(NthDerivative< n - 1, X, F>::get(f));
13  }
14  };
15 
16  template<typename X, typename F>
17  struct NthDerivative<1, X, F> : public Derivative< X, F > { };
18 
19  template<typename X, typename F> struct NthDerivative<0, X, F> {
20  typedef F type;
21  inline static type get(const F& f) { return f; }
22  };
23 
24  template<unsigned n, typename X, typename F>
27 
28 }
29 
30 #endif
type
Definition: HCALResponse.h:22
static type get(const F &f)
Definition: NthDerivative.h:11
NthDerivative< n, X, F >::type nth_derivative(const F &f)
Definition: NthDerivative.h:26
#define X(str)
Definition: MuonsGrabber.cc:49
double f[11][100]
Derivative< X, typename NthDerivative< n-1, X, F >::type >::type type
Definition: NthDerivative.h:10