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 14 of file rangesIntersect.h.
|
inline |
Definition at line 19 of file rangesIntersect.h.