Esempio n. 1
0
 def index(self, item):
     index = busca_bin(self, item)
     index = self.trata_vizinho(item, index)
     if (index < 0):
         raise ValueError()
     else:
         return index
Esempio n. 2
0
 def add(self, novo):
     index = busca_bin(self, novo, True)
     try:
         if (novo > self.__lista[index]):
             index += 1
     except IndexError, e:
         pass
Esempio n. 3
0
 def index(self, item):
     index = busca_bin(self, item)
     index = self.trata_vizinho(item, index)
     if (index < 0):
         raise ValueError()
     else:
         return index
Esempio n. 4
0
 def add(self, novo):
     index = busca_bin(self, novo, True)
     try:
         if (novo > self.__lista[index]):
             index += 1
     except IndexError, e:
         pass
Esempio n. 5
0
 def __contains__(self, item):
     return (busca_bin(self, item) >= 0)
Esempio n. 6
0
 def __contains__(self, item):
     return (busca_bin(self, item) >= 0)