Lines Matching refs:pairs
795 self.pairs = []
801 self.pairs = []
804 return cmp(self.pairs, other.pairs)
807 return hash(self.pairs)
813 self.pairs.sort()
815 while i < len(self.pairs):
816 alo, ahi = self.pairs[i-1]
817 blo, bhi = self.pairs[i]
819 self.pairs[i-1:i+1] = [(alo, max(ahi, bhi))]
825 for lo, hi in self.pairs:
834 for lo, hi in self.pairs:
845 new.pairs = self.pairs[:]
849 return self.pairs[0][0]
852 return self.pairs[-1][-1]
855 for lo, hi in self.pairs:
860 for i in range(len(self.pairs)):
861 lo, hi = self.pairs[i]
864 self.pairs[i] = (x, hi)
866 self.pairs.insert(i, (x, x))
867 if i > 0 and x-1 == self.pairs[i-1][1]:
869 self.pairs[i-1:i+1] = [
870 (self.pairs[i-1][0],
871 self.pairs[i][1])
876 i = len(self.pairs) - 1
878 lo, hi = self.pairs[i]
880 self.pairs[i] = lo, x
882 self.pairs.append((x, x))
886 self.pairs.append((xlo, xhi))
902 self.pairs = self.pairs + new