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

Rename src to source and trg to target

parent fbb1116b
No related branches found
No related tags found
No related merge requests found
......@@ -42,27 +42,28 @@ print('Setting trajectory vertex property...')
for edge in g.edges():
current_cf = g.ep.cost_function[edge]
src = edge.source()
trg = edge.target()
source = edge.source()
target = edge.target()
if src.out_degree() > 1:
if source.out_degree() > 1:
# Source is a split
if current_cf <= min({g.ep.cost_function[e] for e in src.out_edges()}):
if trg.in_degree() > 1:
if current_cf <= min({g.ep.cost_function[e]
for e in source.out_edges()}):
if target.in_degree() > 1:
if current_cf <= min({g.ep.cost_function[e]
for e in trg.out_edges()}):
# Set trg trajectory to src trajectory
traj_prop[trg] = traj_prop[src]
for e in target.out_edges()}):
# Set target trajectory to source trajectory
traj_prop[target] = traj_prop[source]
else:
traj_prop[trg] = traj_prop[src]
traj_prop[target] = traj_prop[source]
else:
# src.out_degree() == 1
if trg.in_degree() > 1:
# source.out_degree() == 1
if target.in_degree() > 1:
if current_cf <= min({g.ep.cost_function[e]
for e in trg.in_edges()}):
traj_prop[trg] = traj_prop[src]
for e in target.in_edges()}):
traj_prop[target] = traj_prop[source]
else:
traj_prop[trg] = traj_prop[src]
traj_prop[target] = traj_prop[source]
print('Creating the dictionary of trajectories...')
visitor = Visitor()
......
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