CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
rangesIntersect.h
Go to the documentation of this file.
1 #ifndef rangesIntersect_H
2 #define rangesIntersect_H
3 
13 template <class Range>
14 inline bool rangesIntersect( const Range& a, const Range& b) {
15  if ( a.first > b.second || b.first > a.second) return false;
16  else return true;
17 }
18 
19 template <class Range, class Less>
20 inline bool rangesIntersect( const Range& a, const Range& b,
21  const Less& less) {
22  if ( less(b.second,a.first) || less(a.second,b.first)) return false;
23  else return true;
24 }
25 #endif
bool rangesIntersect(const Range &a, const Range &b)
PixelRecoRange< float > Range
double b
Definition: hdecay.h:120
double a
Definition: hdecay.h:121