Ejemplo n.º 1
0
 def __hash__(self):
     """Return a hash based on the value that is calculated on demand and cached."""
     if not self._hash:
         self._hash = _misc.get_hash(
             'algebraixlib.mathobjects.couplet.Couplet', self.left,
             self.right)
     return self._hash
Ejemplo n.º 2
0
 def __hash__(self):
     """Return a hash based on the value that is calculated on demand and cached."""
     if not self._hash:
         counter_parts = self.data.items()
         multiset_parts = ['algebraixlib.mathobjects.multiset.Multiset']
         # noinspection PyTypeChecker
         multiset_parts.extend(counter_parts)
         self._hash = _misc.get_hash(*multiset_parts)
     return self._hash
Ejemplo n.º 3
0
 def __hash__(self):
     """Return a hash based on the value that is calculated on demand and cached."""
     if not self._hash:
         counter_parts = self.data.items()
         multiset_parts = ['algebraixlib.mathobjects.multiset.Multiset']
         # noinspection PyTypeChecker
         multiset_parts.extend(counter_parts)
         self._hash = _misc.get_hash(*multiset_parts)
     return self._hash
Ejemplo n.º 4
0
 def __hash__(self):
     """Return a hash based on the member values. (It must match the implementation of `is_same`,
     to which `Structure.__eq__` redirects equality comparisons.) Is always cached.
     """
     return _misc.get_hash(_misc.get_full_class_name(self), self.base_set)
Ejemplo n.º 5
0
 def __hash__(self):
     """Return a hash based on the value that is calculated on demand and cached."""
     if not self._hash:
         self._hash = _misc.get_hash('algebraixlib.mathobjects.set.Set', self.data)
     return self._hash
Ejemplo n.º 6
0
 def __hash__(self):
     """Return a hash based on the member values. (It must match the implementation of `is_same`,
     to which `Structure.__eq__` redirects equality comparisons.) Is always cached.
     """
     return _misc.get_hash(_misc.get_full_class_name(self), self.base_set)
Ejemplo n.º 7
0
 def __hash__(self):
     """Return a hash based on the value that is calculated on demand and cached."""
     if not self._hash:
         self._hash = _misc.get_hash(
             'algebraixlib.mathobjects.couplet.Couplet', self.left, self.right)
     return self._hash