Skip to content
This repository has been archived by the owner on Jan 30, 2023. It is now read-only.

Commit

Permalink
hashing
Browse files Browse the repository at this point in the history
  • Loading branch information
dkrenn committed Aug 23, 2016
1 parent 33209da commit f0de605
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions src/sage/combinat/recognizable_series.py
Original file line number Diff line number Diff line change
Expand Up @@ -723,6 +723,20 @@ def __nonzero__(self):
return True


def __hash__(self):
r"""
A hash value of this recognizable series.
TESTS::
sage: Rec = RecognizableSeriesSpace(ZZ, [0, 1])
sage: S = Rec((Matrix([[1, 0], [0, 1]]), Matrix([[1, 0], [0, 1]])),
....: left=vector([0, 1]), right=vector([1, 0]))
sage: hash(S) # random
42
"""
return hash((self.mu, self.left, self.right))

def transposed(self):
r"""
Return the transposed series.
Expand Down

0 comments on commit f0de605

Please sign in to comment.