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

Commit

Permalink
doctesting all parameters in coefficient_of_word
Browse files Browse the repository at this point in the history
  • Loading branch information
dkrenn committed Aug 23, 2016
1 parent 189ce50 commit 5919120
Showing 1 changed file with 14 additions and 1 deletion.
15 changes: 14 additions & 1 deletion src/sage/combinat/recognizable_series.py
Original file line number Diff line number Diff line change
Expand Up @@ -467,8 +467,21 @@ def coefficient_of_word(self, w, multiply_left=True, multiply_right=True):
sage: W = Rec.indices()
sage: S = Rec((Matrix([[1, 0], [0, 1]]), Matrix([[0, -1], [1, 2]])),
....: left=vector([0, 1]), right=vector([1, 0]))
sage: S[W(7.digits(2))]
sage: S[W(7.digits(2))] # indirect doctest
3
TESTS::
sage: w = W(6.digits(2))
sage: S.coefficient_of_word(w)
2
sage: S.coefficient_of_word(w, multiply_left=False)
(-1, 2)
sage: S.coefficient_of_word(w, multiply_right=False)
(2, 3)
sage: S.coefficient_of_word(w, multiply_left=False, multiply_right=False)
[-1 -2]
[ 2 3]
"""
result = self._mu_of_word_(w)
if multiply_left:
Expand Down

0 comments on commit 5919120

Please sign in to comment.