14#include <OMMathExceptions.H>
20 class Ranges:
public std::vector<Range> {
22 typedef std::vector<Range> base;
29 for (
unsigned i=0;i<size();++i)
30 if ((*
this)[i].intersect(range)) {
31 if (range!=(*
this)[i])
32 throw OverlappingRanges(range,(*
this)[i]);
40 for (
unsigned i=0;i<size();++i)
41 if ((*
this)[i].contains(ind))
43 throw NonExistingBlock(ind);
47 for (
unsigned i=0;i<size();++i)
48 if ((*
this)[i].intersect(range)) {
49 if (range!=(*
this)[i])
50 throw OverlappingRanges(range,(*
this)[i]);
53 throw NonExistingRange(range);
unsigned add(const Range &range)
unsigned find_index(const Range &range) const
unsigned find_index(const size_t ind) const