Skip to content
Snippets Groups Projects
Commit 9dc646dc authored by Lionel GUEZ's avatar Lionel GUEZ
Browse files

Polish

parent 435bd48f
No related branches found
No related tags found
No related merge requests found
......@@ -4,7 +4,8 @@
the graph of segments. A vertex of the new graph is a segment. Input
file should be an edgelist in CSV format. The new graph is output in
the binary format of Graph-tool (file with suffix ".gt") or in GraphML
format (suffix ".graphml".)
format (suffix ".graphml".) The algorithm in this script does not rely
on any ordering of the input edgelist.
"""
......@@ -49,12 +50,12 @@ for v in g.vertices():
# v continues a segment, circumvent v:
g.remove_edge(g.edge(v2, v))
g.vp.inst_eddies[v2].append(int(g.vp.name[v]))
for v3 in v.out_neighbors():
g.remove_edge(g.edge(v, v3))
g.add_edge(v2, v3)
g.vp.inst_eddies[v2].append(int(g.vp.name[v]))
verts_to_del.append(v)
t1 = time.perf_counter()
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment