Skip to content

Commit

Permalink
Rework final loop to be over hashmap instead of indices
Browse files Browse the repository at this point in the history
  • Loading branch information
mtreinish committed Aug 3, 2021
1 parent 347d397 commit 3353b4b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/steiner_tree.rs
Original file line number Diff line number Diff line change
Expand Up @@ -97,8 +97,8 @@ fn _metric_closure_edges(
not defined for a graph with unconnected nodes",
));
}
for node in graph.graph.node_indices().map(|x| x.index()) {
let path_map = &paths[&node].paths;
for (node, path) in paths {
let path_map = path.paths;
nodes.remove(&node);
let distance = &distances[&node];
for v in &nodes {
Expand Down

0 comments on commit 3353b4b

Please sign in to comment.