@@ -52,7 +52,7 @@ const DijkstraResult Graph<T>::dijkstra(const Node<T>& source,
5252 }
5353 // n denotes the number of vertices in graph
5454 // unused
55- // auto n = cachedAdjMatrix ->size();
55+ // auto n = cachedAdjMatrixOut ->size();
5656
5757 // setting all the distances initially to INF_DOUBLE
5858 std::unordered_map<shared<const Node<T>>, double , nodeHash<T>> dist;
@@ -88,8 +88,8 @@ const DijkstraResult Graph<T>::dijkstra(const Node<T>& source,
8888
8989 // for all the reachable vertex from the currently exploring vertex
9090 // we will try to minimize the distance
91- if (cachedAdjMatrix ->find (currentNode) != cachedAdjMatrix ->end ()) {
92- for (const auto & elem : cachedAdjMatrix ->at (currentNode)) {
91+ if (cachedAdjMatrixOut ->find (currentNode) != cachedAdjMatrixOut ->end ()) {
92+ for (const auto & elem : cachedAdjMatrixOut ->at (currentNode)) {
9393 // minimizing distances
9494 if (elem.second ->isWeighted ().has_value () &&
9595 elem.second ->isWeighted ().value ()) {
@@ -177,7 +177,7 @@ const DijkstraResult Graph<T>::dijkstra_deterministic(
177177 }
178178 // n denotes the number of vertices in graph
179179 // unused
180- // auto n = cachedAdjMatrix ->size();
180+ // auto n = cachedAdjMatrixOut ->size();
181181
182182 // setting all the distances initially to INF_DOUBLE
183183 std::unordered_map<shared<const Node<T>>, double , nodeHash<T>> dist;
@@ -232,8 +232,8 @@ const DijkstraResult Graph<T>::dijkstra_deterministic(
232232
233233 // for all the reachable vertex from the currently exploring vertex
234234 // we will try to minimize the distance
235- if (cachedAdjMatrix ->find (currentNode) != cachedAdjMatrix ->end ()) {
236- for (const auto & elem : cachedAdjMatrix ->at (currentNode)) {
235+ if (cachedAdjMatrixOut ->find (currentNode) != cachedAdjMatrixOut ->end ()) {
236+ for (const auto & elem : cachedAdjMatrixOut ->at (currentNode)) {
237237 // minimizing distances
238238 if (elem.second ->isWeighted ().has_value () &&
239239 elem.second ->isWeighted ().value ()) {
@@ -325,7 +325,7 @@ const DijkstraResult Graph<T>::dijkstra_deterministic2(
325325 }
326326 // n denotes the number of vertices in graph
327327 // unused
328- // auto n = cachedAdjMatrix ->size();
328+ // auto n = cachedAdjMatrixOut ->size();
329329
330330 // setting all the distances initially to INF_DOUBLE
331331 std::unordered_map<shared<const Node<T>>, double , nodeHash<T>> dist;
@@ -388,8 +388,8 @@ const DijkstraResult Graph<T>::dijkstra_deterministic2(
388388
389389 // for all the reachable vertex from the currently exploring vertex
390390 // we will try to minimize the distance
391- if (cachedAdjMatrix ->find (currentNode) != cachedAdjMatrix ->end ()) {
392- for (const auto & elem : cachedAdjMatrix ->at (currentNode)) {
391+ if (cachedAdjMatrixOut ->find (currentNode) != cachedAdjMatrixOut ->end ()) {
392+ for (const auto & elem : cachedAdjMatrixOut ->at (currentNode)) {
393393 // minimizing distances
394394 if (elem.second ->isWeighted ().has_value () &&
395395 elem.second ->isWeighted ().value ()) {
@@ -481,7 +481,7 @@ const DijkstraResult Graph<T>::criticalpath_deterministic(
481481 }
482482 // n denotes the number of vertices in graph
483483 // unused
484- // auto n = cachedAdjMatrix ->size();
484+ // auto n = cachedAdjMatrixOut ->size();
485485
486486 // setting all the distances initially to -INF_DOUBLE
487487 std::unordered_map<shared<const Node<T>>, double , nodeHash<T>> dist;
@@ -536,8 +536,8 @@ const DijkstraResult Graph<T>::criticalpath_deterministic(
536536
537537 // for all the reachable vertex from the currently exploring vertex
538538 // we will try to minimize the distance
539- if (cachedAdjMatrix ->find (currentNode) != cachedAdjMatrix ->end ()) {
540- for (const auto & elem : cachedAdjMatrix ->at (currentNode)) {
539+ if (cachedAdjMatrixOut ->find (currentNode) != cachedAdjMatrixOut ->end ()) {
540+ for (const auto & elem : cachedAdjMatrixOut ->at (currentNode)) {
541541 // minimizing distances
542542 if (elem.second ->isWeighted ().has_value () &&
543543 elem.second ->isWeighted ().value ()) {
0 commit comments