Main Page
Namespaces
Classes
Package Documentation
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Properties
Friends
Macros
Pages
src
PhysicsTools
Utilities
interface
NthDerivative.h
Go to the documentation of this file.
1
#ifndef PhysicsTools_Utilities_NthDerivative_h
2
#define PhysicsTools_Utilities_NthDerivative_h
3
4
#include "
PhysicsTools/Utilities/interface/Derivative.h
"
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>
25
typename
NthDerivative<n, X, F>::type
26
nth_derivative
(
const
F&
f
) {
return
NthDerivative< n, X, F >::get
(f); }
27
28
}
29
30
#endif
type
type
Definition:
HCALResponse.h:22
funct::NthDerivative::get
static type get(const F &f)
Definition:
NthDerivative.h:11
funct::Derivative
Definition:
Derivative.h:13
funct::nth_derivative
NthDerivative< n, X, F >::type nth_derivative(const F &f)
Definition:
NthDerivative.h:26
funct::NthDerivative
Definition:
NthDerivative.h:9
X
#define X(str)
Definition:
MuonsGrabber.cc:49
Derivative.h
f
double f[11][100]
Definition:
MuScleFitUtils.cc:79
n
int n
Definition:
DTDataIntegrityTask.cc:32
funct::NthDerivative< 0, X, F >::type
F type
Definition:
NthDerivative.h:20
funct::NthDerivative::type
Derivative< X, typename NthDerivative< n-1, X, F >::type >::type type
Definition:
NthDerivative.h:10
Generated for CMSSW Reference Manual by
1.8.5