def __getitem__(self,x): CostFunction.check_input(self,x) if toSet(x) >= lub(self.A): return -2 elif max(toSet(x) >= a for a in self.A): return -1 else: return 0
def __getitem__(self,x): CostFunction.check_input(self,x) if x == (0,0,0,0) or x == (1,1,1,1): return -1 elif x == self.t: return 1 else: return 0