Compare commits

..

No commits in common. "224ab4a97d70f712c754bd691e774c7c1e7e6423" and "6baec1d7dd53a51e96fccee4d60f05cb279a562a" have entirely different histories.

View file

@ -78,15 +78,11 @@ public class DijkstraAlgorithm extends ShortestPathAlgorithm {
// Si le noeud n'a pas déjà était rajouté au tas, on le rajoute
// isReached permet de vérifier en complexité O(1)
// C'est un léger coût en mémoire pour un gain en vitesse
if (successor.isReached()) {
// removing then inserting resorts the binary heap
tas.remove(successor);
} else {
if (!successor.isReached()) {
tas.insert(successor);
successor.markReached();
notifyNodeReached(successor.getNode());
}
tas.insert(successor);
}
}
}
@ -110,7 +106,7 @@ public class DijkstraAlgorithm extends ShortestPathAlgorithm {
// current node and add it to the path
if (parent_label != null) {
for (Arc arc : parent_label.getNode().getSuccessors()) {
if (arc.getDestination().getId() == current_label.getNode().getId() && data.isAllowed(arc)) {
if (arc.getDestination().getId() == current_label.getNode().getId()) {
arcs_path.add(arc);
break;
}