CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups 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) { return derivative<X>(NthDerivative<n - 1, X, F>::get(f)); }
12  };
13 
14  template <typename X, typename F>
15  struct NthDerivative<1, X, F> : public Derivative<X, F> {};
16 
17  template <typename X, typename F>
18  struct NthDerivative<0, X, F> {
19  typedef F type;
20  inline static type get(const F& f) { return f; }
21  };
22 
23  template <unsigned n, typename X, typename F>
26  }
27 
28 } // namespace funct
29 
30 #endif
static type get(const F &f)
Definition: NthDerivative.h:11
NthDerivative< n, X, F >::type nth_derivative(const F &f)
Definition: NthDerivative.h:24
#define X(str)
Definition: MuonsGrabber.cc:38
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:163