You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Change predecessors[v] = (u, e, cost_of_e) to predecessors[v] = (u, e, cost_of_e, cost_of_s_to_u_plus_cost_of_e) in single_source_shortest_paths(), add a corresponding field to PathInfo, and update extract_shortest_path_from_predecessor_list().
I'm not sure off the top of my head what the use cases for this might be, but I saw that someone created a fork to replace cost_of_e with cost_of_s_to_u_plus_cost_of_e, so it's worth considering.
The text was updated successfully, but these errors were encountered:
As this is just sum(info.costs[:i]), it doesn't seem super useful except as a convenience. It would change the API (the return value of find_path() in particular), so it would have to be added to v3. I'm thinking it doesn't seem worth the effort.
Change
predecessors[v] = (u, e, cost_of_e)
topredecessors[v] = (u, e, cost_of_e, cost_of_s_to_u_plus_cost_of_e)
insingle_source_shortest_paths()
, add a corresponding field toPathInfo
, andupdate extract_shortest_path_from_predecessor_list()
.I'm not sure off the top of my head what the use cases for this might be, but I saw that someone created a fork to replace
cost_of_e
withcost_of_s_to_u_plus_cost_of_e
, so it's worth considering.The text was updated successfully, but these errors were encountered: