Home | History | Annotate | Download | only in testing

Lines Matching refs:Range

14 bool RangeSet::Contains(const Range& range) const {
15 if (IsEmptyRange(range))
18 const Range fixed_range = FixDirection(range);
22 return false; // No ranges includes range.first.
24 --it; // Now it starts equal or before range.first.
28 void RangeSet::Union(const Range& range) {
29 if (IsEmptyRange(range))
32 Range fixed_range = FixDirection(range);
43 ++start; // start element is entirely before current range, skip it.
45 auto end = ranges_.upper_bound(Range(fixed_range.second, fixed_range.second));
58 ranges_.insert(Range(new_start, new_end));
67 RangeSet::Range RangeSet::FixDirection(const Range& range) const {
68 return range.first <= range.second ? range
69 : Range(range.second + 1, range.first + 1);
72 bool RangeSet::IsEmptyRange(const Range& range) const {
73 return range.first == range.second;