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

Commit

Permalink
fix doctests
Browse files Browse the repository at this point in the history
  • Loading branch information
mantepse committed Nov 20, 2018
1 parent 8512ff7 commit 9ec826f
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 23 deletions.
4 changes: 2 additions & 2 deletions src/sage/combinat/posets/poset_examples.py
Expand Up @@ -1398,8 +1398,8 @@ def YoungDiagramPoset(lam):
sage: P = posets.YoungDiagramPoset(Partition([2,2])); P
Finite meet-semilattice containing 4 elements
sage: P.cover_relations()
[[(0, 0), (0, 1)], [(0, 0), (1, 0)], [(0, 1), (1, 1)], [(1, 0),
(1, 1)]]
[[(0, 0), (1, 0)], [(0, 0), (0, 1)], [(1, 0), (1, 1)],
[(0, 1), (1, 1)]]
"""
def cell_leq(a, b):
"""
Expand Down
4 changes: 2 additions & 2 deletions src/sage/combinat/ribbon_shaped_tableau.py
Expand Up @@ -286,11 +286,11 @@ def __iter__(self):
[[1, 2]],
[[1], [2]],
[[1, 2, 3]],
[[None, 2], [1, 3]],
[[None, 1], [2, 3]],
[[None, 2], [1, 3]],
[[1], [2], [3]],
[[1, 2, 3, 4]],
[[None, None, 3], [1, 2, 4]]]
[[None, None, 1], [2, 3, 4]]]
"""
from sage.combinat.partition import _Partitions
for p in _Partitions:
Expand Down
29 changes: 16 additions & 13 deletions src/sage/combinat/skew_tableau.py
Expand Up @@ -1832,9 +1832,8 @@ def __iter__(self):
sage: [next(it) for x in range(10)]
[[],
[[1]],
[[1, 2]], [[1], [2]], [[None, 1], [2]], [[None, 2], [1]],
[[1, 2, 3]], [[1, 2], [3]], [[1, 3], [2]],
[[None, 1, 2], [3]]]
[[1, 2]], [[1], [2]], [[None, 2], [1]], [[None, 1], [2]],
[[1, 2, 3]], [[1, 2], [3]], [[1, 3], [2]], [[None, 2, 3], [1]]]
"""
n = 0
while True:
Expand Down Expand Up @@ -1893,20 +1892,24 @@ def __iter__(self):
EXAMPLES::
sage: StandardSkewTableaux(2).list()
[[[1, 2]], [[1], [2]], [[None, 1], [2]], [[None, 2], [1]]]
[[[1, 2]], [[1], [2]], [[None, 2], [1]], [[None, 1], [2]]]
sage: StandardSkewTableaux(3).list()
[[[1, 2, 3]],
[[1, 2], [3]], [[1, 3], [2]],
[[None, 1, 2], [3]], [[None, 1, 3], [2]], [[None, 2, 3], [1]],
[[None, 1], [2, 3]], [[None, 2], [1, 3]],
[[None, None, 1], [2, 3]], [[None, None, 2], [1, 3]], [[None, None, 3], [1, 2]],
[[1], [2], [3]],
[[None, 1], [None, 2], [3]], [[None, 1], [None, 3], [2]], [[None, 2], [None, 3], [1]],
[[None, 1], [2], [3]], [[None, 2], [1], [3]], [[None, 3], [1], [2]],
[[None, None, 1], [None, 2], [3]], [[None, None, 1], [None, 3], [2]],
[[None, None, 2], [None, 1], [3]], [[None, None, 3], [None, 1], [2]],
[[None, None, 2], [None, 3], [1]], [[None, None, 3], [None, 2], [1]]]
[[None, 2, 3], [1]], [[None, 1, 2], [3]], [[None, 1, 3], [2]],
[[None, 2], [1, 3]], [[None, 1], [2, 3]],
[[None, None, 2], [1, 3]], [[None, None, 3], [1, 2]],
[[None, None, 1], [2, 3]],
[[1], [2], [3]], [[None, 2], [None, 3], [1]],
[[None, 1], [None, 2], [3]], [[None, 1], [None, 3], [2]],
[[None, 2], [1], [3]], [[None, 3], [1], [2]],
[[None, 1], [2], [3]], [[None, None, 3], [None, 2], [1]],
[[None, None, 2], [None, 3], [1]],
[[None, None, 1], [None, 3], [2]],
[[None, None, 1], [None, 2], [3]],
[[None, None, 2], [None, 1], [3]],
[[None, None, 3], [None, 1], [2]]]
"""
for skp in SkewPartitions(self.n):
for sst in StandardSkewTableaux_shape(skp):
Expand Down
12 changes: 6 additions & 6 deletions src/sage/graphs/linearextensions.py
Expand Up @@ -154,12 +154,12 @@ def LinearExtensions(dag):
[0, 2, 4, 1, 3],
[0, 1, 2, 4, 3]]
sage: D.topological_sort_generator()
sage: D.topological_sort_generator().list()
[[0, 1, 2, 3, 4],
[0, 1, 2, 4, 3],
[0, 2, 1, 3, 4],
[0, 2, 1, 4, 3],
[0, 2, 4, 1, 3]]
[0, 2, 4, 1, 3],
[0, 1, 2, 4, 3]]
sage: D = DiGraph({ "a":["b","c"], "b":["d"], "c":["d","e"] })
sage: Poset(D).linear_extensions().list()
Expand All @@ -169,12 +169,12 @@ def LinearExtensions(dag):
['a', 'c', 'e', 'b', 'd'],
['a', 'b', 'c', 'e', 'd']]
sage: D.topological_sort_generator()
sage: D.topological_sort_generator().list()
[['a', 'b', 'c', 'd', 'e'],
['a', 'b', 'c', 'e', 'd'],
['a', 'c', 'b', 'd', 'e'],
['a', 'c', 'b', 'e', 'd'],
['a', 'c', 'e', 'b', 'd']]
['a', 'c', 'e', 'b', 'd'],
['a', 'b', 'c', 'e', 'd']]
TESTS::
Expand Down

0 comments on commit 9ec826f

Please sign in to comment.