CMS 3D CMS Logo

ParametricTrait.h
Go to the documentation of this file.
1 #ifndef PhysicsTools_Utilities_ParametricTrait_h
2 #define PhysicsTools_Utilities_ParametricTrait_h
3 
7 
8 namespace funct {
9 
10  template <typename F>
11  struct Parametric {
12  static const int value = 1;
13  };
14 
15  template <int n>
16  struct Parametric<Numerical<n> > {
17  static const int value = 0;
18  };
19 
20  template <int n, int m>
22  static const int value = 0;
23  };
24 
25 #define NON_PARAMETRIC(FUN) \
26  template <> \
27  struct Parametric<FUN> { \
28  static const int value = 0; \
29  }
30 
31 #define NON_PARAMETRIC_UNARY(FUN) \
32  template <typename A> \
33  struct Parametric<FUN<A> > { \
34  static const int value = Parametric<A>::value; \
35  }
36 
45 
46 #define NON_PARAMETRIC_BINARY(FUN) \
47  template <typename A, typename B> \
48  struct Parametric<FUN<A, B> > { \
49  static const int value = Parametric<A>::value || Parametric<A>::value; \
50  }
51 
56 
57 #undef NON_PARAMETRIC_UNARY
58 #undef NON_PARAMETRIC_BINARY
59 
60 } // namespace funct
61 
62 #endif
dqmiodumpmetadata.n
n
Definition: dqmiodumpmetadata.py:28
Fraction.h
funct::SgnStruct
Definition: Sgn.h:7
funct::ExpStruct
Definition: Exp.h:9
funct::ProductStruct
Definition: Product.h:7
funct::TanStruct
Definition: Tan.h:8
funct::CosStruct
Definition: Cos.h:9
funct::PowerStruct
Definition: Power.h:8
funct::m
m
Definition: Factorize.h:50
funct::FractionStruct
Definition: Fraction.h:11
funct::MinusStruct
Definition: Minus.h:7
value
Definition: value.py:1
funct::AbsStruct
Definition: Abs.h:8
NON_PARAMETRIC_UNARY
#define NON_PARAMETRIC_UNARY(FUN)
Definition: ParametricTrait.h:31
Operations.h
NON_PARAMETRIC_BINARY
#define NON_PARAMETRIC_BINARY(FUN)
Definition: ParametricTrait.h:46
funct::Parametric
Definition: ParametricTrait.h:11
Functions.h
funct::RatioStruct
Definition: Ratio.h:7
funct::SumStruct
Definition: Sum.h:7
funct::SinStruct
Definition: Sin.h:9
funct::Numerical
Definition: Numerical.h:7
funct::LogStruct
Definition: Log.h:9
funct
Definition: Abs.h:5