Home | History | Annotate | Download | only in base

Lines Matching defs:Ranges

19 // Ranges allows holding an ordered list of ranges of [start,end) intervals.
20 // The canonical example use-case is holding the list of ranges of buffered
23 class Ranges {
28 // Returns the number of stored ranges, post coallescing.
31 // Return the number of disjoint ranges.
38 // Clear all ranges.
42 Ranges<T> IntersectionWith(const Ranges<T>& other) const;
57 size_t Ranges<T>::Add(T start, T end) {
58 if (start == end) // Nothing to be done with empty ranges.
63 // Walk along the array of ranges until |start| is no longer larger than the
84 // and the existing ranges.
94 // subsequent ranges. Merge until discontinuities appear. Note that there's
95 // no need to test/merge previous ranges, since needing that would mean the
108 Ranges<base::TimeDelta>::DCheckLT(const base::TimeDelta& lhs,
112 void Ranges<T>::DCheckLT(const T& lhs, const T& rhs) const {
117 size_t Ranges<T>::size() const {
122 T Ranges<T>::start(size_t i) const {
127 T Ranges<T>::end(size_t i) const {
132 void Ranges<T>::clear() {
137 Ranges<T> Ranges<T>::IntersectionWith(const Ranges<T>& other) const {
138 Ranges<T> result;
147 // Add an intersection range to the result if the ranges overlap.