
2009/9/24 Joachim Faulhaber <afojgo@googlemail.com>:
2009/9/24 Gottlob Frege <gottlobfrege@gmail.com>:
As an example usage, with your library, how would you write a 'for a given interval_set, is this time-range [a, b) empty' function?
I am not sure if I understand exactly what you mean here ... but
// This code checks if an interval_set is empty within a range. interval_set<time> some_times; some_times += ...; time a = ..., b = ...; if(intersects(some_times, interval<int>::rightopen(a,b))) ; // Within the range [a,b) some_times is not empty
Correction: must be interval<time> of course // This code checks if an interval_set is empty within a range. interval_set<time> some_times; some_times += ...; time a = ..., b = ...; if(intersects(some_times, interval<time>::rightopen(a,b))) ; // Within the range [a,b) some_times is not empty