PhysicsTools
Utilities
interface
Difference.h
Go to the documentation of this file.
1
#ifndef PhysicsTools_Utilities_Difference_h
2
#define PhysicsTools_Utilities_Difference_h
3
#include "
PhysicsTools/Utilities/interface/Sum.h
"
4
#include "
PhysicsTools/Utilities/interface/Minus.h
"
5
6
namespace
funct
{
7
8
template
<
typename
A,
typename
B>
9
struct
Difference
{
10
typedef
typename
Sum<A, typename Minus<B>::type
>
::type
type
;
11
inline
static
type
combine
(
const
A
&
a
,
const
B
&
b
) {
return
a
+ (-
b
); }
12
};
13
14
template
<
typename
A,
typename
B>
15
inline
typename
Difference<A, B>::type
operator-
(
const
A
&
a
,
const
B
&
b
) {
16
return
Difference<A, B>::combine
(
a
,
b
);
17
}
18
19
}
// namespace funct
20
21
#endif
funct::B
TEMPL(T2) struct Divides B
Definition:
Factorize.h:29
funct::Difference::combine
static type combine(const A &a, const B &b)
Definition:
Difference.h:11
funct::Difference::type
Sum< A, typename Minus< B >::type >::type type
Definition:
Difference.h:10
b
double b
Definition:
hdecay.h:118
Sum.h
a
double a
Definition:
hdecay.h:119
funct::operator-
Difference< A, B >::type operator-(const A &a, const B &b)
Definition:
Difference.h:15
A
funct::Difference
Definition:
Difference.h:9
funct::SumStruct
Definition:
Sum.h:7
funct::Sum
Definition:
Sum.h:18
Minus.h
funct
Definition:
Abs.h:5
Generated for CMSSW Reference Manual by
1.8.16