Template Function ADS::minimumIntervalCover
Defined in File IntervalCover.h
Function Documentation
-
template<class T>
std::optional<std::vector<std::size_t>> ADS::minimumIntervalCover(const std::vector<std::pair<T, T>> &I, T lo, T hi) the places of the fewest closed intervals I whose union contains [ lo , hi ], by increasing left end; nothing if there is none
- Pre:
lo < hi and first <= second for each interval
- Post:
the intervals cover [ lo , hi ]