PhysicsTools
Utilities
interface
Minus.h
Go to the documentation of this file.
1
#ifndef PhysicsTools_Utilities_Minus_h
2
#define PhysicsTools_Utilities_Minus_h
3
4
namespace
funct
{
5
6
template
<
typename
A>
7
struct
MinusStruct
{
8
MinusStruct
() :
_
() {}
9
MinusStruct
(
const
A
&
a
) :
_
(
a
) {}
10
operator
double()
const
{
return
-
_
(); }
11
double
operator()
()
const
{
return
-
_
(); }
12
double
operator()
(
double
x)
const
{
return
-
_
(x); }
13
double
operator()
(
double
x,
double
y)
const
{
return
-
_
(x, y); }
14
A
_
;
15
};
16
17
template
<
typename
A>
18
struct
Minus
{
19
typedef
MinusStruct<A>
type
;
20
static
type
operate
(
const
A
&
a
) {
return
type
(
a
); }
21
};
22
23
template
<
typename
A>
24
inline
typename
Minus<A>::type
operator-
(
const
A
&
a
) {
25
return
Minus<A>::operate
(
a
);
26
}
27
}
// namespace funct
28
29
#endif
funct::Minus
Definition:
Minus.h:18
funct::MinusStruct::MinusStruct
MinusStruct()
Definition:
Minus.h:8
funct::MinusStruct::MinusStruct
MinusStruct(const A &a)
Definition:
Minus.h:9
funct::Minus::operate
static type operate(const A &a)
Definition:
Minus.h:20
a
double a
Definition:
hdecay.h:119
funct::MinusStruct
Definition:
Minus.h:7
funct::operator-
Difference< A, B >::type operator-(const A &a, const B &b)
Definition:
Difference.h:15
A
funct::MinusStruct::_
A _
Definition:
Minus.h:14
funct::Minus::type
MinusStruct< A > type
Definition:
Minus.h:19
funct::MinusStruct::operator()
double operator()(double x, double y) const
Definition:
Minus.h:13
funct::MinusStruct::operator()
double operator()(double x) const
Definition:
Minus.h:12
funct::MinusStruct::operator()
double operator()() const
Definition:
Minus.h:11
funct
Definition:
Abs.h:5
Generated for CMSSW Reference Manual by
1.8.16