Skip to content

Commit

Permalink
simpler doctest
Browse files Browse the repository at this point in the history
  • Loading branch information
dcoudert committed Oct 3, 2024
1 parent 62bff5e commit 79db26b
Showing 1 changed file with 2 additions and 19 deletions.
21 changes: 2 additions & 19 deletions src/sage/graphs/orientations.py
Original file line number Diff line number Diff line change
Expand Up @@ -88,25 +88,8 @@ def acyclic_orientations(G):
Check the orientation of edges::
sage: g = Graph([(0, 1), (1, 2), (2, 3), (3, 0), (0, 2)])
sage: sorted(sorted(h.edges(labels=False)) for h in g.acyclic_orientations())
[[(0, 1), (0, 2), (0, 3), (1, 2), (2, 3)],
[(0, 1), (0, 2), (0, 3), (1, 2), (3, 2)],
[(0, 1), (0, 2), (0, 3), (2, 1), (2, 3)],
[(0, 1), (0, 2), (0, 3), (2, 1), (3, 2)],
[(0, 1), (0, 2), (1, 2), (3, 0), (3, 2)],
[(0, 1), (0, 2), (2, 1), (3, 0), (3, 2)],
[(0, 1), (0, 3), (2, 0), (2, 1), (2, 3)],
[(0, 1), (2, 0), (2, 1), (2, 3), (3, 0)],
[(0, 1), (2, 0), (2, 1), (3, 0), (3, 2)],
[(0, 2), (0, 3), (1, 0), (1, 2), (2, 3)],
[(0, 2), (0, 3), (1, 0), (1, 2), (3, 2)],
[(0, 2), (1, 0), (1, 2), (3, 0), (3, 2)],
[(0, 3), (1, 0), (1, 2), (2, 0), (2, 3)],
[(0, 3), (1, 0), (2, 0), (2, 1), (2, 3)],
[(1, 0), (1, 2), (2, 0), (2, 3), (3, 0)],
[(1, 0), (1, 2), (2, 0), (3, 0), (3, 2)],
[(1, 0), (2, 0), (2, 1), (2, 3), (3, 0)],
[(1, 0), (2, 0), (2, 1), (3, 0), (3, 2)]]
sage: len(set([frozenset(d.edges(labels=false)) for d in g.acyclic_orientations()]))
18
TESTS:
Expand Down

0 comments on commit 79db26b

Please sign in to comment.