CMS 3D CMS Logo

special_less.h
Go to the documentation of this file.
1 #ifndef SPECIAL_LESS
2 #define SPECIAL_LESS
3 
4 #include <cmath>
5 #include <functional>
6 
7 struct fabs_less {
8  bool operator()(const double x, const double y) const {
9  return fabs(x) < fabs(y);
10  }
11 };
12 
13 template <class T>
14 struct pt_less : std::binary_function <T,T,bool> {
15  bool operator() (const T& x, const T& y) const
16  {return x.Pt() < y.Pt();}
17 };
18 
19 template <class T>
20 struct pair2_less : std::binary_function <T,T,bool> {
21  bool operator() (const T& x, const T& y) const
22  {return x.second < y.second;}
23 };
24 
25 #endif
bool operator()(const double x, const double y) const
Definition: special_less.h:8
long double T