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

Polish

parent 7adff23e
No related branches found
No related tags found
No related merge requests found
......@@ -66,18 +66,18 @@ for n in topology.topological_sort(g):
# Find the index of the closest direct predecessor of a node:
# head of the in-edge with smallest cost.
all_cost = g.get_in_edges(n, eprops = [g.edge_properties.cost_function])
all_cost = g.get_in_edges(n, eprops = [g.ep.cost_function])
# numpy array with dtype float64
i_min = all_cost[:, 2].argmin()
closest_pred = all_cost[i_min, 0]
if closest_succ[closest_pred] == n:
# Assign to n the trajectory of closest_pred. This means
# updating ind_traj, traj_prop and
# traj_vert_ind. closest_pred is already in a trajectory,
# traj_prop[closest_pred]] != - 1. We extend the
# trajectory of closest_pred forward.
# Assign to n the trajectory of closest_pred. This
# means updating traj_prop and
# traj_vert_ind. closest_pred is already in a
# trajectory, traj_prop[closest_pred]] != - 1. We
# extend the trajectory of closest_pred forward.
traj_prop[n] = traj_prop[closest_pred]
traj_vert_ind[traj_prop[n]].append(n)
else:
......
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