# HG changeset patch
# Parent 7f6b2f103a972f8cb6e21a269dc8b14690534ccc
# User Keshav Kini
# Date 1328014756 -28800
documentation fixes
diff --git a/sage/graphs/digraph.py b/sage/graphs/digraph.py
--- a/sage/graphs/digraph.py
+++ b/sage/graphs/digraph.py
@@ -1698,9 +1698,10 @@
ending vertices of the paths. If None, then all vertices are
allowed.
- ``simple`` - boolean (default: False). If set to True, then
- only simple paths are considered. A path is simple if no
- vertex occurs twice in it except possibly the first and last
- ones.
+ only simple paths are considered. Simple paths are paths in
+ which no two arcs share a head or share a tail, i.e. every
+ vertex in the path is entered at most once and exited at most
+ once.
- ``max_length`` - non negative integer (default: None). The
maximum length of the enumerated paths. If set to None, then
all lengths are allowed.
@@ -1732,10 +1733,10 @@
['b', 'c', 'd', 'c', 'd']
['b', 'c', 'd', 'c', 'd', 'c']
- One may wish to enumerate simple paths, i.e. paths such that no
- vertex occurs twice in it except possibly the first and last
- one. The result is always finite but may be long to be
- computed::
+ One may wish to enumerate simple paths, which are paths in which
+ no two arcs share a head or share a tail, i.e. every vertex in
+ the path is entered at most once and exited at most once. The
+ result is always finite but may take a long time to compute::
sage: pi = g._all_paths_iterator('a', simple=True)
sage: list(pi)
@@ -1796,10 +1797,13 @@
# We try all possible extensions
if simple:
- # We only keep simple extensions. One exception: when we
- # have found a simple cycle. In this case, we yield it
- # immediately, but don't consider it for further extension.
- # See trac #12385.
+ # We only keep simple extensions. An extension is simple
+ # iff the new vertex being entered has not previously
+ # occurred in the path, or has occurred but only been
+ # exited (i.e. is the first vertex in the path). In this
+ # latter case we must not exit the new vertex again, so we
+ # do not consider it for further extension, but just yield
+ # it immediately. See trac #12385.
for neighbor in self.neighbor_out_iterator(path[-1]):
if neighbor not in path:
queue.append(path + [neighbor])
@@ -1835,9 +1839,10 @@
the allowed ending vertices of the paths. If None,
then all vertices are allowed.
- ``simple`` - boolean (default: False). If set to True,
- then only simple paths are considered. A path is simple
- if no vertex occurs twice in it except if the starting
- and ending ones are equal.
+ then only simple paths are considered. These are paths in
+ which no two arcs share a head or share a tail, i.e. every
+ vertex in the path is entered at most once and exited at most
+ once.
- ``max_length`` - non negative integer (default: None).
The maximum length of the enumerated paths. If set to None,
then all lengths are allowed.
@@ -1883,7 +1888,7 @@
['a', 'a', 'a', 'a', 'a', 'b']
One may prefer to enumerate only simple paths (see
- ``all_simple_paths(...)``)::
+ :meth:`all_simple_paths`)::
sage: pi = g.all_paths_iterator(simple=True)
sage: list(pi)
@@ -1951,9 +1956,9 @@
max_length=None, trivial=False):
r"""
Returns a list of all the simple paths of self starting
- with one of the given vertices. A path is simple if no vertex
- occurs twice in it except possibly the starting and ending one.
- The paths are enumerated in increasing length order.
+ with one of the given vertices. Simple paths are paths in which
+ no two arcs share a head or share a tail, i.e. every vertex in
+ the path is entered at most once and exited at most once.
INPUT:
@@ -2163,7 +2168,7 @@
.. NOTE::
- See also ``all_simple_cycles(...)``.
+ See also :meth:`all_simple_cycles`.
AUTHOR:
@@ -2206,21 +2211,24 @@
sage: it = g.all_cycles_iterator(max_length=3)
sage: list(it)
- [['a', 'a'], ['a', 'a', 'a'], ['c', 'd', 'c'], ['a', 'a', 'a', 'a']]
+ [['a', 'a'], ['a', 'a', 'a'], ['c', 'd', 'c'],
+ ['a', 'a', 'a', 'a']]
By default, cycles differing only by their starting point are not all
enumerated, but this may be parametrized::
sage: it = g.all_cycles_iterator(max_length=3, rooted=False)
sage: list(it)
- [['a', 'a'], ['a', 'a', 'a'], ['c', 'd', 'c'], ['a', 'a', 'a', 'a']]
+ [['a', 'a'], ['a', 'a', 'a'], ['c', 'd', 'c'],
+ ['a', 'a', 'a', 'a']]
sage: it = g.all_cycles_iterator(max_length=3, rooted=True)
sage: list(it)
- [['a', 'a'], ['a', 'a', 'a'], ['c', 'd', 'c'], ['d', 'c', 'd'], ['a', 'a', 'a', 'a']]
+ [['a', 'a'], ['a', 'a', 'a'], ['c', 'd', 'c'], ['d', 'c', 'd'],
+ ['a', 'a', 'a', 'a']]
One may prefer to enumerate simple cycles, i.e. cycles such that the only
vertex occuring twice in it is the starting and ending one (see also
- ``all_simple_cycles(...)``::
+ :meth:`all_simple_cycles`)::
sage: it = g.all_cycles_iterator(simple=True)
sage: list(it)
@@ -2231,19 +2239,26 @@
"""
if starting_vertices is None:
starting_vertices = self
- # Since a cycle is always included in a given strongly connected component,
- # we may remove edges from the graph
+ # Since a cycle is always included in a given strongly connected
+ # component, we may remove edges from the graph
sccs = self.strongly_connected_components()
d = {}
for id, component in enumerate(sccs):
for v in component:
d[v] = id
h = self.copy()
- h.delete_edges([(u,v) for (u,v) in h.edge_iterator(labels=False) if d[u] != d[v]])
- # We create one cycles iterator per vertex
- # This is necessary if we want to iterate over cycles
- # with increasing length
- vertex_iterators = dict([(v, h._all_cycles_iterator_vertex(v, starting_vertices=starting_vertices, simple=simple, rooted=rooted, max_length=max_length, trivial=trivial, remove_acyclic_edges=False)) for v in starting_vertices])
+ h.delete_edges([ (u,v) for (u,v) in h.edge_iterator(labels=False)
+ if d[u] != d[v] ])
+ # We create one cycles iterator per vertex. This is necessary if we
+ # want to iterate over cycles with increasing length.
+ vertex_iterators = dict([(v, h._all_cycles_iterator_vertex( v
+ , starting_vertices=starting_vertices
+ , simple=simple
+ , rooted=rooted
+ , max_length=max_length
+ , trivial=trivial
+ , remove_acyclic_edges=False
+ )) for v in starting_vertices])
cycles = []
for vi in vertex_iterators.values():
try:
@@ -2259,7 +2274,8 @@
# We choose the shortest available cycle
_, shortest_cycle = heappop(cycles)
yield shortest_cycle
- # We update the cycle iterator to its next available cycle if it exists
+ # We update the cycle iterator to its next available cycle if it
+ # exists
try:
cycle = vertex_iterators[shortest_cycle[0]].next()
heappush(cycles, (len(cycle), cycle))
@@ -2294,9 +2310,9 @@
.. NOTE::
- Although the number of simple cycles of a finite graph
- is always finite, computing all its cycle may take a very
- long time.
+ Although the number of simple cycles of a finite graph is
+ always finite, computing all its cycles may take a very long
+ time.
EXAMPLES::
@@ -2308,15 +2324,41 @@
sage: g = graphs.PetersenGraph().to_directed()
sage: g.all_simple_cycles(max_length=4)
- [[0, 1, 0], [0, 4, 0], [0, 5, 0], [1, 2, 1], [1, 6, 1], [2, 3, 2], [2, 7, 2], [3, 8, 3], [3, 4, 3], [4, 9, 4], [5, 8, 5], [5, 7, 5], [6, 8, 6], [6, 9, 6], [7, 9, 7]]
+ [[0, 1, 0], [0, 4, 0], [0, 5, 0], [1, 2, 1], [1, 6, 1], [2, 3, 2],
+ [2, 7, 2], [3, 8, 3], [3, 4, 3], [4, 9, 4], [5, 8, 5], [5, 7, 5],
+ [6, 8, 6], [6, 9, 6], [7, 9, 7]]
sage: g.all_simple_cycles(max_length=6)
- [[0, 1, 0], [0, 4, 0], [0, 5, 0], [1, 2, 1], [1, 6, 1], [2, 3, 2], [2, 7, 2], [3, 8, 3], [3, 4, 3], [4, 9, 4], [5, 8, 5], [5, 7, 5], [6, 8, 6], [6, 9, 6], [7, 9, 7], [0, 1, 2, 3, 4, 0], [0, 1, 2, 7, 5, 0], [0, 1, 6, 8, 5, 0], [0, 1, 6, 9, 4, 0], [0, 4, 9, 6, 1, 0], [0, 4, 9, 7, 5, 0], [0, 4, 3, 8, 5, 0], [0, 4, 3, 2, 1, 0], [0, 5, 8, 3, 4, 0], [0, 5, 8, 6, 1, 0], [0, 5, 7, 9, 4, 0], [0, 5, 7, 2, 1, 0], [1, 2, 3, 8, 6, 1], [1, 2, 7, 9, 6, 1], [1, 6, 8, 3, 2, 1], [1, 6, 9, 7, 2, 1], [2, 3, 8, 5, 7, 2], [2, 3, 4, 9, 7, 2], [2, 7, 9, 4, 3, 2], [2, 7, 5, 8, 3, 2], [3, 8, 6, 9, 4, 3], [3, 4, 9, 6, 8, 3], [5, 8, 6, 9, 7, 5], [5, 7, 9, 6, 8, 5], [0, 1, 2, 3, 8, 5, 0], [0, 1, 2, 7, 9, 4, 0], [0, 1, 6, 8, 3, 4, 0], [0, 1, 6, 9, 7, 5, 0], [0, 4, 9, 6, 8, 5, 0], [0, 4, 9, 7, 2, 1, 0], [0, 4, 3, 8, 6, 1, 0], [0, 4, 3, 2, 7, 5, 0], [0, 5, 8, 3, 2, 1, 0], [0, 5, 8, 6, 9, 4, 0], [0, 5, 7, 9, 6, 1, 0], [0, 5, 7, 2, 3, 4, 0], [1, 2, 3, 4, 9, 6, 1], [1, 2, 7, 5, 8, 6, 1], [1, 6, 8, 5, 7, 2, 1], [1, 6, 9, 4, 3, 2, 1], [2, 3, 8, 6, 9, 7, 2], [2, 7, 9, 6, 8, 3, 2], [3, 8, 5, 7, 9, 4, 3], [3, 4, 9, 7, 5, 8, 3]]
+ [[0, 1, 0], [0, 4, 0], [0, 5, 0], [1, 2, 1], [1, 6, 1], [2, 3, 2],
+ [2, 7, 2], [3, 8, 3], [3, 4, 3], [4, 9, 4], [5, 8, 5], [5, 7, 5],
+ [6, 8, 6], [6, 9, 6], [7, 9, 7], [0, 1, 2, 3, 4, 0],
+ [0, 1, 2, 7, 5, 0], [0, 1, 6, 8, 5, 0], [0, 1, 6, 9, 4, 0],
+ [0, 4, 9, 6, 1, 0], [0, 4, 9, 7, 5, 0], [0, 4, 3, 8, 5, 0],
+ [0, 4, 3, 2, 1, 0], [0, 5, 8, 3, 4, 0], [0, 5, 8, 6, 1, 0],
+ [0, 5, 7, 9, 4, 0], [0, 5, 7, 2, 1, 0], [1, 2, 3, 8, 6, 1],
+ [1, 2, 7, 9, 6, 1], [1, 6, 8, 3, 2, 1], [1, 6, 9, 7, 2, 1],
+ [2, 3, 8, 5, 7, 2], [2, 3, 4, 9, 7, 2], [2, 7, 9, 4, 3, 2],
+ [2, 7, 5, 8, 3, 2], [3, 8, 6, 9, 4, 3], [3, 4, 9, 6, 8, 3],
+ [5, 8, 6, 9, 7, 5], [5, 7, 9, 6, 8, 5], [0, 1, 2, 3, 8, 5, 0],
+ [0, 1, 2, 7, 9, 4, 0], [0, 1, 6, 8, 3, 4, 0],
+ [0, 1, 6, 9, 7, 5, 0], [0, 4, 9, 6, 8, 5, 0],
+ [0, 4, 9, 7, 2, 1, 0], [0, 4, 3, 8, 6, 1, 0],
+ [0, 4, 3, 2, 7, 5, 0], [0, 5, 8, 3, 2, 1, 0],
+ [0, 5, 8, 6, 9, 4, 0], [0, 5, 7, 9, 6, 1, 0],
+ [0, 5, 7, 2, 3, 4, 0], [1, 2, 3, 4, 9, 6, 1],
+ [1, 2, 7, 5, 8, 6, 1], [1, 6, 8, 5, 7, 2, 1],
+ [1, 6, 9, 4, 3, 2, 1], [2, 3, 8, 6, 9, 7, 2],
+ [2, 7, 9, 6, 8, 3, 2], [3, 8, 5, 7, 9, 4, 3],
+ [3, 4, 9, 7, 5, 8, 3]]
The complete graph (without loops) on `4` vertices::
sage: g = graphs.CompleteGraph(4).to_directed()
sage: g.all_simple_cycles()
- [[0, 1, 0], [0, 2, 0], [0, 3, 0], [1, 2, 1], [1, 3, 1], [2, 3, 2], [0, 1, 2, 0], [0, 1, 3, 0], [0, 2, 1, 0], [0, 2, 3, 0], [0, 3, 1, 0], [0, 3, 2, 0], [1, 2, 3, 1], [1, 3, 2, 1], [0, 1, 2, 3, 0], [0, 1, 3, 2, 0], [0, 2, 1, 3, 0], [0, 2, 3, 1, 0], [0, 3, 1, 2, 0], [0, 3, 2, 1, 0]]
+ [[0, 1, 0], [0, 2, 0], [0, 3, 0], [1, 2, 1], [1, 3, 1], [2, 3, 2],
+ [0, 1, 2, 0], [0, 1, 3, 0], [0, 2, 1, 0], [0, 2, 3, 0],
+ [0, 3, 1, 0], [0, 3, 2, 0], [1, 2, 3, 1], [1, 3, 2, 1],
+ [0, 1, 2, 3, 0], [0, 1, 3, 2, 0], [0, 2, 1, 3, 0],
+ [0, 2, 3, 1, 0], [0, 3, 1, 2, 0], [0, 3, 2, 1, 0]]
If the graph contains a large number of cycles, one can bound
the length of the cycles, or simply restrict the possible
@@ -2324,10 +2366,52 @@
sage: g = graphs.CompleteGraph(20).to_directed()
sage: g.all_simple_cycles(max_length=2)
- [[0, 1, 0], [0, 2, 0], [0, 3, 0], [0, 4, 0], [0, 5, 0], [0, 6, 0], [0, 7, 0], [0, 8, 0], [0, 9, 0], [0, 10, 0], [0, 11, 0], [0, 12, 0], [0, 13, 0], [0, 14, 0], [0, 15, 0], [0, 16, 0], [0, 17, 0], [0, 18, 0], [0, 19, 0], [1, 2, 1], [1, 3, 1], [1, 4, 1], [1, 5, 1], [1, 6, 1], [1, 7, 1], [1, 8, 1], [1, 9, 1], [1, 10, 1], [1, 11, 1], [1, 12, 1], [1, 13, 1], [1, 14, 1], [1, 15, 1], [1, 16, 1], [1, 17, 1], [1, 18, 1], [1, 19, 1], [2, 3, 2], [2, 4, 2], [2, 5, 2], [2, 6, 2], [2, 7, 2], [2, 8, 2], [2, 9, 2], [2, 10, 2], [2, 11, 2], [2, 12, 2], [2, 13, 2], [2, 14, 2], [2, 15, 2], [2, 16, 2], [2, 17, 2], [2, 18, 2], [2, 19, 2], [3, 4, 3], [3, 5, 3], [3, 6, 3], [3, 7, 3], [3, 8, 3], [3, 9, 3], [3, 10, 3], [3, 11, 3], [3, 12, 3], [3, 13, 3], [3, 14, 3], [3, 15, 3], [3, 16, 3], [3, 17, 3], [3, 18, 3], [3, 19, 3], [4, 5, 4], [4, 6, 4], [4, 7, 4], [4, 8, 4], [4, 9, 4], [4, 10, 4], [4, 11, 4], [4, 12, 4], [4, 13, 4], [4, 14, 4], [4, 15, 4], [4, 16, 4], [4, 17, 4], [4, 18, 4], [4, 19, 4], [5, 6, 5], [5, 7, 5], [5, 8, 5], [5, 9, 5], [5, 10, 5], [5, 11, 5], [5, 12, 5], [5, 13, 5], [5, 14, 5], [5, 15, 5], [5, 16, 5], [5, 17, 5], [5, 18, 5], [5, 19, 5], [6, 7, 6], [6, 8, 6], [6, 9, 6], [6, 10, 6], [6, 11, 6], [6, 12, 6], [6, 13, 6], [6, 14, 6], [6, 15, 6], [6, 16, 6], [6, 17, 6], [6, 18, 6], [6, 19, 6], [7, 8, 7], [7, 9, 7], [7, 10, 7], [7, 11, 7], [7, 12, 7], [7, 13, 7], [7, 14, 7], [7, 15, 7], [7, 16, 7], [7, 17, 7], [7, 18, 7], [7, 19, 7], [8, 9, 8], [8, 10, 8], [8, 11, 8], [8, 12, 8], [8, 13, 8], [8, 14, 8], [8, 15, 8], [8, 16, 8], [8, 17, 8], [8, 18, 8], [8, 19, 8], [9, 10, 9], [9, 11, 9], [9, 12, 9], [9, 13, 9], [9, 14, 9], [9, 15, 9], [9, 16, 9], [9, 17, 9], [9, 18, 9], [9, 19, 9], [10, 11, 10], [10, 12, 10], [10, 13, 10], [10, 14, 10], [10, 15, 10], [10, 16, 10], [10, 17, 10], [10, 18, 10], [10, 19, 10], [11, 12, 11], [11, 13, 11], [11, 14, 11], [11, 15, 11], [11, 16, 11], [11, 17, 11], [11, 18, 11], [11, 19, 11], [12, 13, 12], [12, 14, 12], [12, 15, 12], [12, 16, 12], [12, 17, 12], [12, 18, 12], [12, 19, 12], [13, 14, 13], [13, 15, 13], [13, 16, 13], [13, 17, 13], [13, 18, 13], [13, 19, 13], [14, 15, 14], [14, 16, 14], [14, 17, 14], [14, 18, 14], [14, 19, 14], [15, 16, 15], [15, 17, 15], [15, 18, 15], [15, 19, 15], [16, 17, 16], [16, 18, 16], [16, 19, 16], [17, 18, 17], [17, 19, 17], [18, 19, 18]]
+ [[0, 1, 0], [0, 2, 0], [0, 3, 0], [0, 4, 0], [0, 5, 0], [0, 6, 0],
+ [0, 7, 0], [0, 8, 0], [0, 9, 0], [0, 10, 0], [0, 11, 0],
+ [0, 12, 0], [0, 13, 0], [0, 14, 0], [0, 15, 0], [0, 16, 0],
+ [0, 17, 0], [0, 18, 0], [0, 19, 0], [1, 2, 1], [1, 3, 1],
+ [1, 4, 1], [1, 5, 1], [1, 6, 1], [1, 7, 1], [1, 8, 1], [1, 9, 1],
+ [1, 10, 1], [1, 11, 1], [1, 12, 1], [1, 13, 1], [1, 14, 1],
+ [1, 15, 1], [1, 16, 1], [1, 17, 1], [1, 18, 1], [1, 19, 1],
+ [2, 3, 2], [2, 4, 2], [2, 5, 2], [2, 6, 2], [2, 7, 2], [2, 8, 2],
+ [2, 9, 2], [2, 10, 2], [2, 11, 2], [2, 12, 2], [2, 13, 2],
+ [2, 14, 2], [2, 15, 2], [2, 16, 2], [2, 17, 2], [2, 18, 2],
+ [2, 19, 2], [3, 4, 3], [3, 5, 3], [3, 6, 3], [3, 7, 3], [3, 8, 3],
+ [3, 9, 3], [3, 10, 3], [3, 11, 3], [3, 12, 3], [3, 13, 3],
+ [3, 14, 3], [3, 15, 3], [3, 16, 3], [3, 17, 3], [3, 18, 3],
+ [3, 19, 3], [4, 5, 4], [4, 6, 4], [4, 7, 4], [4, 8, 4], [4, 9, 4],
+ [4, 10, 4], [4, 11, 4], [4, 12, 4], [4, 13, 4], [4, 14, 4],
+ [4, 15, 4], [4, 16, 4], [4, 17, 4], [4, 18, 4], [4, 19, 4],
+ [5, 6, 5], [5, 7, 5], [5, 8, 5], [5, 9, 5], [5, 10, 5],
+ [5, 11, 5], [5, 12, 5], [5, 13, 5], [5, 14, 5], [5, 15, 5],
+ [5, 16, 5], [5, 17, 5], [5, 18, 5], [5, 19, 5], [6, 7, 6],
+ [6, 8, 6], [6, 9, 6], [6, 10, 6], [6, 11, 6], [6, 12, 6],
+ [6, 13, 6], [6, 14, 6], [6, 15, 6], [6, 16, 6], [6, 17, 6],
+ [6, 18, 6], [6, 19, 6], [7, 8, 7], [7, 9, 7], [7, 10, 7],
+ [7, 11, 7], [7, 12, 7], [7, 13, 7], [7, 14, 7], [7, 15, 7],
+ [7, 16, 7], [7, 17, 7], [7, 18, 7], [7, 19, 7], [8, 9, 8],
+ [8, 10, 8], [8, 11, 8], [8, 12, 8], [8, 13, 8], [8, 14, 8],
+ [8, 15, 8], [8, 16, 8], [8, 17, 8], [8, 18, 8], [8, 19, 8],
+ [9, 10, 9], [9, 11, 9], [9, 12, 9], [9, 13, 9], [9, 14, 9],
+ [9, 15, 9], [9, 16, 9], [9, 17, 9], [9, 18, 9], [9, 19, 9],
+ [10, 11, 10], [10, 12, 10], [10, 13, 10], [10, 14, 10],
+ [10, 15, 10], [10, 16, 10], [10, 17, 10], [10, 18, 10],
+ [10, 19, 10], [11, 12, 11], [11, 13, 11], [11, 14, 11],
+ [11, 15, 11], [11, 16, 11], [11, 17, 11], [11, 18, 11],
+ [11, 19, 11], [12, 13, 12], [12, 14, 12], [12, 15, 12],
+ [12, 16, 12], [12, 17, 12], [12, 18, 12], [12, 19, 12],
+ [13, 14, 13], [13, 15, 13], [13, 16, 13], [13, 17, 13],
+ [13, 18, 13], [13, 19, 13], [14, 15, 14], [14, 16, 14],
+ [14, 17, 14], [14, 18, 14], [14, 19, 14], [15, 16, 15],
+ [15, 17, 15], [15, 18, 15], [15, 19, 15], [16, 17, 16],
+ [16, 18, 16], [16, 19, 16], [17, 18, 17], [17, 19, 17],
+ [18, 19, 18]]
sage: g = graphs.CompleteGraph(20).to_directed()
sage: g.all_simple_cycles(max_length=2, starting_vertices=[0])
- [[0, 1, 0], [0, 2, 0], [0, 3, 0], [0, 4, 0], [0, 5, 0], [0, 6, 0], [0, 7, 0], [0, 8, 0], [0, 9, 0], [0, 10, 0], [0, 11, 0], [0, 12, 0], [0, 13, 0], [0, 14, 0], [0, 15, 0], [0, 16, 0], [0, 17, 0], [0, 18, 0], [0, 19, 0]]
+ [[0, 1, 0], [0, 2, 0], [0, 3, 0], [0, 4, 0], [0, 5, 0], [0, 6, 0],
+ [0, 7, 0], [0, 8, 0], [0, 9, 0], [0, 10, 0], [0, 11, 0],
+ [0, 12, 0], [0, 13, 0], [0, 14, 0], [0, 15, 0], [0, 16, 0],
+ [0, 17, 0], [0, 18, 0], [0, 19, 0]]
One may prefer to distinguish equivalent cycles having distinct
starting vertices (compare the following examples)::
@@ -2336,7 +2420,8 @@
sage: g.all_simple_cycles(max_length=2, rooted=False)
[[0, 1, 0], [0, 2, 0], [0, 3, 0], [1, 2, 1], [1, 3, 1], [2, 3, 2]]
sage: g.all_simple_cycles(max_length=2, rooted=True)
- [[0, 1, 0], [0, 2, 0], [0, 3, 0], [1, 0, 1], [1, 2, 1], [1, 3, 1], [2, 0, 2], [2, 1, 2], [2, 3, 2], [3, 0, 3], [3, 1, 3], [3, 2, 3]]
+ [[0, 1, 0], [0, 2, 0], [0, 3, 0], [1, 0, 1], [1, 2, 1], [1, 3, 1],
+ [2, 0, 2], [2, 1, 2], [2, 3, 2], [3, 0, 3], [3, 1, 3], [3, 2, 3]]
"""
return list(self.all_cycles_iterator(starting_vertices=starting_vertices, simple=True, rooted=rooted, max_length=max_length, trivial=trivial))