Example #1
0
 def __eq__(self,other):
     if other.__class__.__name__ == "SharpTernary":
         return (self.dom == other.dom 
                 and self.pos == other.pos
                 and self.vals == other.vals)
     else:
         return Operation.__eq__(self,other)
Example #2
0
    def __eq__(self,other):
        """
        Test if this operation is equal to another.

        If the other operation is another instance MinMax, then we can
        simply compare the families of sets defining each. Otherwise,
        we use the more expensive compare method from Operation.
        
        :param other: The other operation.
        :type other: :class:`Operation`
        """
        if other.__class__.__name__ == "MinMax":
            return self.S == other.S
        else:
            return Operation.__eq__(self,other)