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

Commit

Permalink
Finished replacing deprecated public tests and did some pyflakes clea…
Browse files Browse the repository at this point in the history
…nup.
  • Loading branch information
Travis Scrimshaw committed Mar 19, 2014
1 parent ee4789f commit a695b22
Show file tree
Hide file tree
Showing 11 changed files with 437 additions and 444 deletions.
34 changes: 13 additions & 21 deletions src/sage/combinat/crystals/affine_factorization.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,9 @@ class AffineFactorizationCrystal(UniqueRepresentation, Parent):
EXAMPLES::
sage: from sage.combinat.crystals.affine_factorization import AffineFactorizationCrystal
sage: W = WeylGroup(['A',3,1], prefix='s')
sage: w = W.from_reduced_word([2,3,2,1])
sage: B = AffineFactorizationCrystal(w,3); B
sage: B = crystals.AffineFactorization(w,3); B
Crystal on affine factorizations of type A3 associated to s2*s3*s2*s1
sage: B.list()
[(1, s2, s3*s2*s1),
Expand All @@ -58,7 +57,7 @@ class AffineFactorizationCrystal(UniqueRepresentation, Parent):
We can also access the crystal by specifying a skew shape in terms of `k`-bounded partitions::
sage: AffineFactorizationCrystal([[3,1,1],[1]], 3, k=3)
sage: crystals.AffineFactorization([[3,1,1],[1]], 3, k=3)
Crystal on affine factorizations of type A3 associated to s2*s3*s2*s1
We can compute the highest weight elements::
Expand Down Expand Up @@ -86,7 +85,7 @@ class AffineFactorizationCrystal(UniqueRepresentation, Parent):
The cut point `x` is not supposed to occur in the reduced words for `w`::
sage: B = AffineFactorizationCrystal([[3,2],[2]],4,x=0,k=3)
sage: B = crystals.AffineFactorization([[3,2],[2]],4,x=0,k=3)
Traceback (most recent call last):
...
ValueError: x cannot be in reduced word of s0*s3*s2
Expand All @@ -98,10 +97,9 @@ def __classcall_private__(cls, w, n, x = None, k = None):
TESTS::
sage: from sage.combinat.crystals.affine_factorization import AffineFactorizationCrystal
sage: A = AffineFactorizationCrystal([[3,1],[1]], 4, k=3); A
sage: A = crystals.AffineFactorization([[3,1],[1]], 4, k=3); A
Crystal on affine factorizations of type A4 associated to s3*s2*s1
sage: AC = AffineFactorizationCrystal([Core([4,1],4),Core([1],4)], 4, k=3)
sage: AC = crystals.AffineFactorization([Core([4,1],4),Core([1],4)], 4, k=3)
sage: AC is A
True
"""
Expand All @@ -122,13 +120,12 @@ def __init__(self, w, n, x = None, k = None):
r"""
EXAMPLES::
sage: from sage.combinat.crystals.affine_factorization import AffineFactorizationCrystal
sage: B = AffineFactorizationCrystal([[3,2],[2]],4,x=0,k=3)
sage: B = crystals.AffineFactorization([[3,2],[2]],4,x=0,k=3)
Traceback (most recent call last):
...
ValueError: x cannot be in reduced word of s0*s3*s2
sage: B = AffineFactorizationCrystal([[3,2],[2]],4,k=3)
sage: B = crystals.AffineFactorization([[3,2],[2]],4,k=3)
sage: B.x
1
sage: B.w
Expand All @@ -140,10 +137,9 @@ def __init__(self, w, n, x = None, k = None):
TESTS::
sage: from sage.combinat.crystals.affine_factorization import AffineFactorizationCrystal
sage: W = WeylGroup(['A',3,1], prefix='s')
sage: w = W.from_reduced_word([2,3,2,1])
sage: B = AffineFactorizationCrystal(w,3)
sage: B = crystals.AffineFactorization(w,3)
sage: TestSuite(B).run()
"""
Parent.__init__(self, category = ClassicalCrystals())
Expand All @@ -168,13 +164,12 @@ def _repr_(self):
r"""
EXAMPLES::
sage: from sage.combinat.crystals.affine_factorization import AffineFactorizationCrystal
sage: W = WeylGroup(['A',3,1], prefix='s')
sage: w = W.from_reduced_word([3,2,1])
sage: AffineFactorizationCrystal(w,4)
sage: crystals.AffineFactorization(w,4)
Crystal on affine factorizations of type A4 associated to s3*s2*s1
sage: AffineFactorizationCrystal([[3,1],[1]], 4, k=3)
sage: crystals.AffineFactorization([[3,1],[1]], 4, k=3)
Crystal on affine factorizations of type A4 associated to s3*s2*s1
"""
return "Crystal on affine factorizations of type A{} associated to {}".format(self.n, self.w)
Expand All @@ -190,8 +185,7 @@ def e(self, i):
EXAMPLES::
sage: from sage.combinat.crystals.affine_factorization import AffineFactorizationCrystal
sage: B = AffineFactorizationCrystal([[3,1],[1]], 4, k=3)
sage: B = crystals.AffineFactorization([[3,1],[1]], 4, k=3)
sage: t = B(B.module_generators[1]); t
(1, 1, s3, s2*s1)
sage: t.e(1)
Expand Down Expand Up @@ -222,8 +216,7 @@ def f(self, i):
EXAMPLES::
sage: from sage.combinat.crystals.affine_factorization import AffineFactorizationCrystal
sage: B = AffineFactorizationCrystal([[3,1],[1]], 4, k=3)
sage: B = crystals.AffineFactorization([[3,1],[1]], 4, k=3)
sage: t = B(B.module_generators[1]); t
(1, 1, s3, s2*s1)
sage: t.f(2)
Expand Down Expand Up @@ -256,8 +249,7 @@ def bracketing(self, i):
EXAMPLES::
sage: from sage.combinat.crystals.affine_factorization import AffineFactorizationCrystal
sage: B = AffineFactorizationCrystal([[3,1],[1]], 3, k=3, x=4)
sage: B = crystals.AffineFactorization([[3,1],[1]], 3, k=3, x=4)
sage: t = B(B.module_generators[1]); t
(1, s3, s2*s1)
sage: t.bracketing(1)
Expand Down
Loading

0 comments on commit a695b22

Please sign in to comment.