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
Composition.h
Go to the documentation of this file.
1
#ifndef PhysicsTools_Utilities_Composition_h
2
#define PhysicsTools_Utilities_Composition_h
3
#include <boost/static_assert.hpp>
4
5
namespace
funct
{
6
template
<
typename
A,
typename
B>
7
struct
CompositionStruct
{
8
CompositionStruct
(
const
A
&
a
,
const
B
&
b
) :
_1
(
a
),
_2
(
b
) {}
9
double
operator()
()
const
{
return
_1
(
_2
()); }
10
operator
double()
const
{
return
_1
(
_2
()); }
11
double
operator()
(
double
x)
const
{
return
_1
(
_2
(x)); }
12
double
operator()
(
double
x,
double
y)
const
{
return
_1
(
_2
(x, y)); }
13
A
_1
;
14
B
_2
;
15
};
16
17
template
<
typename
A,
typename
B>
18
struct
Composition
{
19
typedef
CompositionStruct<A, B>
type
;
20
static
type
compose
(
const
A
&
a
,
const
B
&
b
) {
return
type
(
a
,
b
); }
21
};
22
23
template
<
typename
A,
typename
B>
24
inline
typename
funct::Composition<A, B>::type
compose
(
const
A
&
a
,
const
B
&
b
) {
25
return
funct::Composition<A, B>::compose
(
a
,
b
);
26
}
27
28
}
// namespace funct
29
30
#endif
funct::CompositionStruct::_2
B _2
Definition:
Composition.h:14
funct::B
TEMPL(T2) struct Divides B
Definition:
Factorize.h:29
funct::CompositionStruct::operator()
double operator()(double x) const
Definition:
Composition.h:11
funct::CompositionStruct::operator()
double operator()(double x, double y) const
Definition:
Composition.h:12
funct::CompositionStruct
Definition:
Composition.h:7
funct::Composition::compose
static type compose(const A &a, const B &b)
Definition:
Composition.h:20
b
double b
Definition:
hdecay.h:118
funct::Composition
Definition:
Composition.h:18
a
double a
Definition:
hdecay.h:119
A
funct::CompositionStruct::CompositionStruct
CompositionStruct(const A &a, const B &b)
Definition:
Composition.h:8
funct::CompositionStruct::_1
A _1
Definition:
Composition.h:13
funct
Definition:
Abs.h:5
funct::Composition::type
CompositionStruct< A, B > type
Definition:
Composition.h:19
funct::compose
funct::Composition< A, B >::type compose(const A &a, const B &b)
Definition:
Composition.h:24
funct::CompositionStruct::operator()
double operator()() const
Definition:
Composition.h:9
Generated for CMSSW Reference Manual by
1.8.16