(self, *args)
return self.And(res)
Encodes the 'all-different' constraint using two possible
        encodings.

        AllDifferent(x, y, z) := (x != y) & (x != z) & (y != z)
Encodes the 'all-different' constraint using two possible
        encodings.
Encodes the all - different constraint using two possible encodings .
def AllDifferent(self, *args):
        """ Encodes the 'all-different' constraint using two possible
        encodings.

        AllDifferent(x, y, z) := (x != y) & (x != z) & (y != z)
        """
        exprs = self._polymorph_args_to_tuple(args)
        res = []
        for i, a in enumerate(exprs):
            for b in exprs[i+1:]:
                res.append(self.Not(self.EqualsOrIff(a, b)))
        return self.And(res)
def AllDifferent ( self , * args ) : exprs = self . _polymorph_args_to_tuple ( args ) res = [ ] for i , a in enumerate ( exprs ) : for b in exprs [ i + 1 : ] : res . append ( self . Not ( self . EqualsOrIff ( a , b ) ) ) return self . And ( res )