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

Polish

parent a2a08a62
No related branches found
No related tags found
No related merge requests found
......@@ -46,16 +46,17 @@ for edge in g.edges():
# source is a split
if src.out_degree() > 1:
if current_cf <= min({g.ep.cost_function[e] for e in src.out_edges()}):
# elif target is a merge
if trg.in_degree() > 1:
if current_cf <= min({g.ep.cost_function[e] for e in trg.out_edges()}):
# add trg to src trajectory
if current_cf <= min({g.ep.cost_function[e]
for e in trg.out_edges()}):
# Set trg trajectory to src trajectory
g.vp.traj[trg] = g.vp.traj[src]
# else, target is a split or end or continuation
else:
g.vp.traj[trg] = g.vp.traj[src]
# source is a continuation or root with one out
elif (src.in_degree() == 1 and src.out_degree() == 1) or (src.in_degree() == 0 and src.out_degree() == 1) or (src.in_degree() > 1):
elif src.in_degree() == 1 and src.out_degree() == 1 \
or src.in_degree() == 0 and src.out_degree() == 1 \
or src.in_degree() > 1:
# source is a continuation or root with one out
if trg.in_degree() > 1:
# if the current cf is the smallest
if current_cf <= min({g.ep.cost_function[e] for e in trg.in_edges()}):
......
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