@@ -5124,7 +5124,7 @@ def cycle_basis(self, output='vertex'):
5124
5124
sage: G.cycle_basis() # optional - networkx
5125
5125
[[0, 2], [2, 1, 0]]
5126
5126
sage: G.cycle_basis(output='edge') # optional - networkx
5127
- [[(0, 2, 'a '), (2, 0, 'b ')], [(2, 1, 'd'), (1, 0, 'c'), (0, 2, 'a')]]
5127
+ [[(0, 2, 'b '), (2, 0, 'a ')], [(2, 1, 'd'), (1, 0, 'c'), (0, 2, 'a')]]
5128
5128
sage: H = Graph([(1, 2), (2, 3), (2, 3), (3, 4), (1, 4),
5129
5129
....: (1, 4), (4, 5), (5, 6), (4, 6), (6, 7)], multiedges=True)
5130
5130
sage: H.cycle_basis() # optional - networkx
@@ -5166,10 +5166,9 @@ def cycle_basis(self, output='vertex'):
5166
5166
sage: G.cycle_basis() # optional - networkx
5167
5167
[[2, 3], [4, 3, 2, 1], [4, 3, 2, 1]]
5168
5168
sage: G.cycle_basis(output='edge') # optional - networkx
5169
- [[(2, 3, 'b '), (3, 2, 'c ')],
5169
+ [[(2, 3, 'c '), (3, 2, 'b ')],
5170
5170
[(4, 3, 'd'), (3, 2, 'b'), (2, 1, 'a'), (1, 4, 'f')],
5171
5171
[(4, 3, 'e'), (3, 2, 'b'), (2, 1, 'a'), (1, 4, 'f')]]
5172
-
5173
5172
"""
5174
5173
if output not in ['vertex', 'edge']:
5175
5174
raise ValueError('output must be either vertex or edge')
0 commit comments