[Networkit] [NetworKit] Possible bug with multiple instances of an edge

Arie Slobbe aslobbe at macalester.edu
Thu Aug 6 16:54:31 CEST 2015


Hi all,

Please take a look at the following ipython notebook session.

INPUT
G = Graph(2, True, True)
G.addEdge(0, 1, 2.71)
G.addEdge(0, 1, 3.14)
print(G.edges(), " ", G.weight(0, 1))

OUTPUT
[(0, 1), (0, 1)]   2.71

I'm not completely sure if this multi-edge behavior is intended. In
particular, there is a method in Graph.cpp called checkConsistency which
checks for multiedges, suggesting that multiedges are a natural extension
of NetworKit's Graph object. If that is the case, then should G.weight(u,
v) return the weight of each occurrence of the edge u->v ?

Any ideas and suggestions would be much appreciated!

Arie
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.ira.uni-karlsruhe.de/mailman/private/networkit/attachments/20150806/8796c6e1/attachment.html>


More information about the NetworKit mailing list