CMS 3D CMS Logo

ExpressionBinaryOperatorSetter.h
Go to the documentation of this file.
1 #ifndef CommonTools_Utils_ExpressionBinaryOperatorSetter_h
2 #define CommonTools_Utils_ExpressionBinaryOperatorSetter_h
3 /* \class reco::parser::ExpressionBinaryOperator
4  *
5  * Binary operator expression setter
6  *
7  * \author original version: Chris Jones, Cornell,
8  * adapted by Luca Lista, INFN
9  *
10  * \version $Revision: 1.2 $
11  *
12  */
15 #include <cmath>
16 
17 namespace reco {
18  namespace parser {
19 
20  template <typename T>
21  struct power_of {
22  T operator()(T lhs, T rhs) const { return pow(lhs, rhs); }
23  };
24 
25  template <typename T>
27  T operator()(T lhs, T rhs) const { return int(lhs) % int(rhs); }
28  };
29 
30  template <typename Op>
33  void operator()(const char*, const char*) const {
35  }
36 
37  private:
39  };
40  } // namespace parser
41 } // namespace reco
42 
43 #endif
std::shared_ptr< ExpressionBase > ExpressionPtr
std::vector< std::shared_ptr< ExpressionBase > > ExpressionStack
stack
Definition: svgfig.py:559
void operator()(const char *, const char *) const
fixed size matrix
long double T
Power< A, B >::type pow(const A &a, const B &b)
Definition: Power.h:29