fix(dijkstra): observers
This commit is contained in:
parent
c223936743
commit
dcc2bc0746
1 changed files with 2 additions and 2 deletions
|
@ -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());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue