fix(dijkstra): observers

This commit is contained in:
Paul Alnet 2024-05-03 12:52:29 +02:00
parent c223936743
commit dcc2bc0746

View file

@ -55,8 +55,7 @@ public class DijkstraAlgorithm extends ShortestPathAlgorithm {
while (!tas.isEmpty() && !(labels.get(dest_id).getNode().equals(x.getNode()))) {
x = tas.deleteMin();
x.mark();
// A marked node is considered as reached
notifyNodeReached(x.getNode());
notifyNodeMarked(x.getNode());
// We create a list of node successors of x, instead of a list of Arcs.
float arc_cost = 0;
@ -86,6 +85,7 @@ public class DijkstraAlgorithm extends ShortestPathAlgorithm {
else {
tas.insert(successor);
}
notifyDestinationReached(successor.getNode());
}
}
}