Skip to content

Commit 30ff99d

Browse files
committed
add comments
1 parent ee16014 commit 30ff99d

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

src/sage/graphs/cycle_enumeration.py

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,8 @@ def _all_cycles_iterator_vertex(self, vertex, starting_vertices=None, simple=Fal
156156
...
157157
ValueError: negative weight is not allowed
158158
159-
The function works for an undirected graph::
159+
The function works for an undirected graph. Specifically, each cycle is
160+
enumerated exactly once, meaning a cycle and its reverse are not listed separately::
160161
161162
sage: g = Graph({0: [1, 2], 1: [0, 2], 2: [0, 1]})
162163
sage: it = g._all_cycles_iterator_vertex(0, simple=False)
@@ -581,7 +582,8 @@ def all_cycles_iterator(self, starting_vertices=None, simple=False,
581582
...
582583
ValueError: The algorithm 'B' is available only when simple=True.
583584
584-
The algorithm ``'A'`` works for undirected graphs as well::
585+
The algorithm ``'A'`` works for undirected graphs as well. Specifically, each cycle is
586+
enumerated exactly once, meaning a cycle and its reverse are not listed separately::
585587
586588
sage: g = Graph({0: [1, 2], 1: [0, 2], 2: [0, 1]})
587589
sage: for cycle in g.all_cycles_iterator(algorithm='A', simple=True):
@@ -883,7 +885,8 @@ def all_simple_cycles(self, starting_vertices=None, rooted=False,
883885
sage: cycles.sort() == cycles_B.sort()
884886
True
885887
886-
The algorithm ``'A'`` is available for undirected graphs::
888+
The algorithm ``'A'`` is available for undirected graphs. Specifically, each cycle is
889+
enumerated exactly once, meaning a cycle and its reverse are not listed separately::
887890
888891
sage: g = Graph({0: [1, 2], 1: [0, 2], 2: [0, 1]})
889892
sage: g.all_simple_cycles(algorithm='A')

0 commit comments

Comments
 (0)