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