Main Page
Namespaces
Namespace List
Namespace Members
All
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Functions
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Variables
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Typedefs
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Enumerations
a
b
c
d
e
f
g
h
i
j
k
l
m
o
p
q
r
s
t
u
v
w
z
Enumerator
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Classes
Class List
Class Index
Class Hierarchy
Class Members
All
:
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
Functions
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
Variables
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Typedefs
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Enumerations
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
Enumerator
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Properties
_
a
d
e
f
l
m
o
p
s
t
u
v
Related Functions
:
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
Package Documentation
•
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Properties
Friends
Macros
Modules
Pages
PhysicsTools
Utilities
interface
Power.h
Go to the documentation of this file.
1
#ifndef PhysicsTools_Utilities_Power_h
2
#define PhysicsTools_Utilities_Power_h
3
#include <boost/static_assert.hpp>
4
#include <cmath>
5
6
namespace
funct
{
7
template
<
typename
A,
typename
B>
8
struct
PowerStruct
{
9
PowerStruct
(
const
A
&
a
,
const
B
&
b
) :
_1
(
a
),
_2
(
b
) {}
10
double
operator()
()
const
{
return
std::pow
(
_1
(),
_2
()); }
11
operator
double()
const
{
return
std::pow
(
_1
(),
_2
()); }
12
double
operator()
(
double
x)
const
{
return
std::pow
(
_1
(x),
_2
(x)); }
13
double
operator()
(
double
x,
double
y)
const
{
return
std::pow
(
_1
(x, y),
_2
(x, y)); }
14
A
_1
;
15
B
_2
;
16
};
17
18
template
<
typename
A,
typename
B>
19
struct
Power
{
20
typedef
PowerStruct<A, B>
type
;
21
static
type
combine
(
const
A
&
a
,
const
B
&
b
) {
return
type
(
a
,
b
); }
22
};
23
24
template
<
typename
A,
typename
B>
25
inline
typename
Power<A, B>::type
operator^
(
const
A
&
a
,
const
B
&
b
) {
26
return
Power<A, B>::combine
(
a
,
b
);
27
}
28
29
template
<
typename
A,
typename
B>
30
inline
typename
Power<A, B>::type
pow
(
const
A
&
a
,
const
B
&
b
) {
31
return
Power<A, B>::combine
(
a
,
b
);
32
}
33
34
}
// namespace funct
35
36
#endif
funct::PowerStruct::operator()
double operator()(double x) const
Definition:
Power.h:12
funct::PowerStruct::operator()
double operator()(double x, double y) const
Definition:
Power.h:13
funct::B
TEMPL(T2) struct Divides B
Definition:
Factorize.h:29
funct::operator^
Power< A, B >::type operator^(const A &a, const B &b)
Definition:
Power.h:25
funct::PowerStruct
Definition:
Power.h:8
funct::PowerStruct::operator()
double operator()() const
Definition:
Power.h:10
funct::Power
Definition:
Power.h:19
b
double b
Definition:
hdecay.h:118
funct::Power::combine
static type combine(const A &a, const B &b)
Definition:
Power.h:21
a
double a
Definition:
hdecay.h:119
A
funct::Power::type
PowerStruct< A, B > type
Definition:
Power.h:20
funct::pow
Power< A, B >::type pow(const A &a, const B &b)
Definition:
Power.h:30
funct::PowerStruct::PowerStruct
PowerStruct(const A &a, const B &b)
Definition:
Power.h:9
funct::PowerStruct::_1
A _1
Definition:
Power.h:14
funct
Definition:
Abs.h:5
funct::PowerStruct::_2
B _2
Definition:
Power.h:15
Generated for CMSSW Reference Manual by
1.8.16