Main Page
Namespaces
Classes
Package Documentation
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Properties
Friends
Macros
Groups
Pages
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::operator-
Difference< A, B >::type operator-(const A &a, const B &b)
Definition:
Difference.h:15
funct::B
B
Definition:
Factorize.h:24
funct::Difference
Definition:
Difference.h:9
Sum.h
funct::Difference::combine
static type combine(const A &a, const B &b)
Definition:
Difference.h:11
funct::SumStruct
Definition:
Sum.h:7
funct::Difference::type
Sum< A, typename Minus< B >::type >::type type
Definition:
Difference.h:10
b
double b
Definition:
hdecay.h:118
Minus.h
a
double a
Definition:
hdecay.h:119
funct::Sum
Definition:
Sum.h:18
funct::A
A
Definition:
Factorize.h:45
Generated for CMSSW Reference Manual by
1.8.5