PhysicsTools
Utilities
interface
Exp.h
Go to the documentation of this file.
1
#ifndef PhysicsTools_Utilities_Exp_h
2
#define PhysicsTools_Utilities_Exp_h
3
4
#include <cmath>
5
6
namespace
funct
{
7
8
template
<
typename
T>
9
struct
ExpStruct
{
10
ExpStruct
(
const
T
&
t
) :
_
(
t
) {}
11
inline
double
operator()
()
const
{
return ::exp
(
_
()); }
12
T
_
;
13
};
14
15
template
<
typename
T>
16
struct
Exp
{
17
typedef
ExpStruct<T>
type
;
18
inline
static
type
compose
(
const
T
&
t
) {
return
type
(
t
); }
19
};
20
21
template
<
typename
T>
22
inline
typename
Exp<T>::type
exp
(
const
T
&
t
) {
23
return
Exp<T>::compose
(
t
);
24
}
25
26
}
// namespace funct
27
28
#endif
funct::ExpStruct
Definition:
Exp.h:9
funct::Exp::type
ExpStruct< T > type
Definition:
Exp.h:17
funct::ExpStruct::_
T _
Definition:
Exp.h:12
funct::Exp
Definition:
Exp.h:16
funct::Exp::compose
static type compose(const T &t)
Definition:
Exp.h:18
funct::ExpStruct::operator()
double operator()() const
Definition:
Exp.h:11
funct::exp
Exp< T >::type exp(const T &t)
Definition:
Exp.h:22
funct::ExpStruct::ExpStruct
ExpStruct(const T &t)
Definition:
Exp.h:10
T
long double T
Definition:
Basic3DVectorLD.h:48
submitPVValidationJobs.t
string t
Definition:
submitPVValidationJobs.py:644
funct
Definition:
Abs.h:5
Generated for CMSSW Reference Manual by
1.8.16