mhs
unread,Dec 7, 2010, 3:57:56 PM12/7/10Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to sage-devel
Hi,
I encountered a strange behaviour of the add_edges method for DiGraphs
(using SAGE 4.5.1). Perhaps this is intended behaviour, but as it
seems quiet odd to me I would like to hear the opinion of more
experienced (di)graph-users. Maybe this is a real bug...
If I define a looped, multi-edge empty digraph with
G=DiGraph({},multi_edges=True,loops=True)
I can add a couple of edges at once using
G.add_edges([[0,1],[0,1],[1,1],[0,0],[1,0],[0,1]])
this gives the correct graph (having 2 vertices and 6 edges).
Nevertheless, if I define my digraph with
G=DiGraph(multi_edges=True,loops=True)
or
G=DiGraph([],multi_edges=True,loops=True)
the same command to add edges
G.add_edges([[0,1],[0,1],[1,1],[0,0],[1,0],[0,1]])
gives a digraph on 2 vertices but with only 4 edges (the double edge
is not created).
Even stranger: If I put edge labels I can see that whenever I add more
edges afterwards an old edge gets deleted and is replaced by a new
one, but never does the graph have multi-edges.
Looking forward to an explanation of this funny behaviour.
Best
M.