Skip to content

Commit

Permalink
Fix Dijkstra can not work with DirectedWeightedEdge ZigRazor#205
Browse files Browse the repository at this point in the history
  • Loading branch information
aengusjiang committed May 19, 2022
1 parent 2515d53 commit c668363
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions include/Graph/Graph.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -1004,9 +1004,9 @@ namespace CXXGRAPH
// setting all the distances initially to INF_DOUBLE
std::unordered_map<const Node<T> *, double> dist;

for (auto &&elem : adj)
for (const auto &node : nodeSet )
{
dist[elem.first] = INF_DOUBLE;
dist[node] = INF_DOUBLE;
}

// creating a min heap using priority queue
Expand Down

0 comments on commit c668363

Please sign in to comment.