summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSébastien Labbé <slabqc@gmail.com>2018-05-24 10:12:05 +0200
committerSébastien Labbé <slabqc@gmail.com>2018-05-24 10:12:38 +0200
commit25da49e6e04ca7fed46442d27f66d3dc297362ab (patch)
tree230bfaf90dbe6aaf358be05338c32e71a5a7ed2b
parent25125: Calling constructor dancing_links() only in reinitialize not in __init__ (diff)
25125: sorted lists in doctests
-rw-r--r--src/sage/combinat/matrices/dancing_links.pyx6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/sage/combinat/matrices/dancing_links.pyx b/src/sage/combinat/matrices/dancing_links.pyx
index 6d8ef9b..4a17401 100644
--- a/src/sage/combinat/matrices/dancing_links.pyx
+++ b/src/sage/combinat/matrices/dancing_links.pyx
@@ -558,7 +558,7 @@ cdef class dancing_linksWrapper:
sage: from sage.combinat.matrices.dancing_links import dlx_solver
sage: rows = [[0,1,2], [3,4,5], [0,1], [2,3,4,5], [0], [1,2,3,4,5]]
sage: d = dlx_solver(rows)
- sage: list(d.solutions_iterator())
+ sage: sorted(d.solutions_iterator())
[[0, 1], [2, 3], [4, 5]]
TESTS:
@@ -566,7 +566,7 @@ cdef class dancing_linksWrapper:
The algorithm is automatically reinitialized if needed, for example
when iterating the solutions a second time (:trac:`25125`)::
- sage: list(d.solutions_iterator())
+ sage: sorted(d.solutions_iterator())
[[0, 1], [2, 3], [4, 5]]
"""
if self._x.search_is_started():
@@ -680,7 +680,7 @@ cdef class dancing_linksWrapper:
sage: rows = [[0,1,2], [3,4,5], [0,1], [2,3,4,5], [0], [1,2,3,4,5]]
sage: d = dlx_solver(rows)
sage: S = d.all_solutions()
- sage: [sorted(s) for s in S]
+ sage: sorted(sorted(s) for s in S)
[[0, 1], [2, 3], [4, 5]]
The number of CPUs can be specified as input::