CMS 3D CMS Logo

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
static type get(const F &f)
Definition: NthDerivative.h:11
Definition: Abs.h:5
NthDerivative< n, X, F >::type nth_derivative(const F &f)
Definition: NthDerivative.h:26
#define X(str)
Definition: MuonsGrabber.cc:48
double f[11][100]
Derivative< X, typename NthDerivative< n-1, X, F >::type >::type type
Definition: NthDerivative.h:10
static uInt32 F(BLOWFISH_CTX *ctx, uInt32 x)
Definition: blowfish.cc:281