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

Commit

Permalink
rearrange __getitem__
Browse files Browse the repository at this point in the history
  • Loading branch information
dkrenn committed Aug 22, 2016
1 parent 41874ba commit 0f538a9
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/sage/combinat/recognizable_series.py
Original file line number Diff line number Diff line change
Expand Up @@ -430,7 +430,7 @@ def _latex_(self):


@cached_method
def __getitem__(self, w):
def coefficient_of_word(self, w):
r"""
Return the coefficient to word `w` of this series.
Expand All @@ -456,6 +456,9 @@ def __getitem__(self, w):
return self.left * self._mu_of_word_(w) * self.right


__getitem__ = coefficient_of_word


@cached_method
def _mu_of_empty_word_(self):
r"""
Expand Down Expand Up @@ -860,7 +863,7 @@ def mu_prime_entry(a, p, q, iq):
mu_prime.append(Matrix(M))

left_prime = vector([ZZ(1)] + (len(P)-1)*[ZZ(0)])
right_prime = vector(self[p] for p in P)
right_prime = vector(self.coefficient_of_word(p) for p in P)

return self.parent().element_class(
self.parent(), mu_prime, left_prime, right_prime)
Expand Down

0 comments on commit 0f538a9

Please sign in to comment.