forked from sagemath/sage
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
10 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -202,7 +202,7 @@ | |
sage: f.bispecial_factors() | ||
[word: , word: 0, word: 010, word: 010010, word: 01001010010] | ||
""" | ||
#***************************************************************************** | ||
# **************************************************************************** | ||
# Copyright (C) 2008 Arnaud Bergeron <[email protected]>, | ||
# 2008 Amy Glen <[email protected]>, | ||
# 2008-2012 Sébastien Labbé <[email protected]>, | ||
|
@@ -213,17 +213,21 @@ | |
# the Free Software Foundation, either version 2 of the License, or | ||
# (at your option) any later version. | ||
# https://www.gnu.org/licenses/ | ||
#***************************************************************************** | ||
# **************************************************************************** | ||
from itertools import repeat | ||
from collections import defaultdict | ||
from itertools import islice, cycle | ||
from sage.combinat.words.abstract_word import Word_class | ||
from sage.combinat.words.words import Words | ||
from sage.misc.cachefunc import cached_method | ||
from sage.combinat.words.word_options import word_options | ||
from sage.rings.all import Integer, Infinity, ZZ, QQ | ||
from sage.rings.infinity import Infinity | ||
from sage.rings.integer import Integer | ||
from sage.rings.integer_ring import ZZ | ||
from sage.rings.rational_field import QQ | ||
from sage.sets.set import Set | ||
|
||
|
||
class FiniteWord_class(Word_class): | ||
def __str__(self): | ||
r""" | ||
|
@@ -409,7 +413,7 @@ def concatenate(self, other): | |
return other | ||
if isinstance(other, Word_class) and other.is_empty(): | ||
return self | ||
f = CallableFromListOfWords([self,other]) | ||
f = CallableFromListOfWords([self, other]) | ||
length = self.length() + other.length() | ||
parent = self._parent | ||
if length == Infinity: | ||
|
@@ -623,7 +627,7 @@ def is_yamanouchi(self, n=None): | |
return False | ||
return True | ||
|
||
def schuetzenberger_involution(self, n = None): | ||
def schuetzenberger_involution(self, n=None): | ||
r""" | ||
Return the Schützenberger involution of the word ``self``, which is obtained | ||
by reverting the word and then complementing all letters within the | ||
|
@@ -6922,7 +6926,7 @@ def colored_vector(self, x=0, y=0, width='default', height=1, cmap='hsv', thickn | |
xq = xp + base | ||
L = [(xp,y), (xq,y), (xq,ymax), (xp,ymax) ] | ||
rgbcolor = mpl_cmap( i / dim ) [:3] | ||
rep += polygon(L, rgbcolor = rgbcolor) | ||
rep += polygon(L, rgbcolor=rgbcolor) | ||
xp = xq | ||
rep.axes(False) | ||
return rep | ||
|