Commit 1b185bcb authored by Tiago Peixoto's avatar Tiago Peixoto
Browse files

collection.konect: Fix handling of bipartite graphs

parent 26e770f5
......@@ -62,6 +62,8 @@ def load_koblenz_dir(dirname):
if "asym" not in line:
edges[:,:2] -= 1 # we need zero-based indexing
if "bip" in line: # bipartite graphs have non-unique indexing
edges[:,1] += edges[:,0].max() + 1
if edges.shape[1] > 2:
g.ep.weight = g.new_edge_property("int")
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment