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
) {
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>
24
typename
NthDerivative<n, X, F>::type
nth_derivative
(
const
F
&
f
) {
25
return
NthDerivative<n, X, F>::get
(
f
);
26
}
27
28
}
// namespace funct
29
30
#endif
funct::NthDerivative::get
static type get(const F &f)
Definition:
NthDerivative.h:11
dqmiodumpmetadata.n
n
Definition:
dqmiodumpmetadata.py:28
f
double f[11][100]
Definition:
MuScleFitUtils.cc:78
X
#define X(str)
Definition:
MuonsGrabber.cc:38
funct::X
Definition:
Variables.h:51
F
static uInt32 F(BLOWFISH_CTX *ctx, uInt32 x)
Definition:
blowfish.cc:163
funct::nth_derivative
NthDerivative< n, X, F >::type nth_derivative(const F &f)
Definition:
NthDerivative.h:24
funct::NthDerivative< 0, X, F >::get
static type get(const F &f)
Definition:
NthDerivative.h:20
funct::NthDerivative< 0, X, F >::type
F type
Definition:
NthDerivative.h:19
funct::Derivative
Definition:
Derivative.h:13
funct::NthDerivative::type
Derivative< X, typename NthDerivative< n - 1, X, F >::type >::type type
Definition:
NthDerivative.h:10
funct::Numerical
Definition:
Numerical.h:7
Derivative.h
funct
Definition:
Abs.h:5
funct::NthDerivative
Definition:
NthDerivative.h:9
Generated for CMSSW Reference Manual by
1.8.16