Go to the source code of this file.
Functions | |
template<typename Range > | |
bool | rangesIntersect (const Range &a, const Range &b) |
template<typename Range , typename Less > | |
bool | rangesIntersect (const Range &a, const Range &b, Less const &less) |
template<typename Range , typename T > | |
bool | rangesIntersect (const Range &a, const Range &b, bool(*less)(T, T)) |
Utility for checking efficiently if two one-dimantional intervals intersect. Precondition: the intervals are not empty, i.e. for i in a,b i.first <= i.second. The Range template argument is expected to have the std::pair interface, i.e. for Range instance r r.first is the beginning of the interval and r.second is the end of the interval.
Definition at line 24 of file rangesIntersect.h.
Referenced by LayerCollector::allLayers(), OuterDetCompatibility::checkPhi(), OuterDetCompatibility::checkR(), OuterDetCompatibility::checkZ(), PixelRecoRange< float >::hasIntersection(), StartingLayerFinder::operator()(), barrelUtil::overlap(), and tkDetUtil::overlapInPhi().
|
inline |
Definition at line 29 of file rangesIntersect.h.