Skip to content

Commit 0421445

Browse files
committed
Modification of examples and new location for import of parent
In case return_labels == True, the returned dictionary is different from a previous version. An example output had to be modified accordingly.
1 parent 65a4946 commit 0421445

File tree

1 file changed

+6
-7
lines changed

1 file changed

+6
-7
lines changed

src/sage/graphs/line_graph.pyx

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
11
# cython: binding=True
2-
3-
from sage.structure.element cimport parent
42
r"""
53
Line graphs
64
@@ -129,6 +127,7 @@ Functions
129127
---------
130128
"""
131129

130+
from sage.structure.element cimport parent
132131

133132
def is_line_graph(g, certificate=False):
134133
r"""
@@ -367,11 +366,11 @@ def line_graph(g, labels=True, return_labels=False):
367366
(1, 2, 4), None), ((0, 1, 0), (0, 2, 3), None), ((0, 1, 0),
368367
(1, 2, 4), None), ((0, 2, 3), (1, 2, 4), None)]
369368
sage: L[1]
370-
{(0, 1, 0): None,
371-
(0, 1, 1): 'a',
372-
(0, 1, 2): 'b',
373-
(0, 2, 3): None,
374-
(1, 2, 4): 'c'}
369+
{(0, 1, 0): (0, 1, None),
370+
(0, 1, 1): (0, 1, 'b'),
371+
(0, 1, 2): (0, 1, 'a'),
372+
(0, 2, 3): (0, 2, None),
373+
(1, 2, 4): (1, 2, 'c')}
375374
sage: g = DiGraph([(0,1),(0,1),(1,2)],multiedges=True)
376375
sage: g.line_graph().edges()
377376
[((0, 1, 1), (1, 2, 2), None), ((0, 1, 0), (1, 2, 2), None)]

0 commit comments

Comments
 (0)