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

Bug fix: start list `inst_eddies` with vertex name

Initialize the list `inst_eddies` with vertex name in the initial
graph, which is the graph of eddies. Else the list for a segment may
miss some instantaneous eddies. This bug is demonstrated in test
`Edgelist_Isic_2` where segment 10 missed eddy 10 and segment 29
missed 29.
parent c368e491
No related branches found
No related tags found
No related merge requests found
......@@ -37,13 +37,11 @@ t0 = t1
g.vp['inst_eddies'] = g.new_vp('vector<int>')
print('Collapsing into segments...')
for v in g.vertices(): g.vp.inst_eddies[v] = [int(g.vp.name[v])]
g.set_fast_edge_removal()
verts_to_del = []
for v in g.vertices():
if not g.vp.inst_eddies[v]:
g.vp.inst_eddies[v] = [int(g.vp.name[v])]
if v.in_degree() == 1:
v2 = next(v.in_edges()).source()
......
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