Dijkstra fonctionnel, enfin

This commit is contained in:
Favary Pierre 2021-04-25 19:40:48 +02:00
parent a1784cc36c
commit 91e3152d6d

View file

@ -54,12 +54,12 @@ public class DijkstraAlgorithm extends ShortestPathAlgorithm {
if (tablabel[y].cout>tablabel[x].cout+(float)data.getCost(arcy)) { if (tablabel[y].cout>tablabel[x].cout+(float)data.getCost(arcy)) {
tablabel[y].cout=tablabel[x].cout+(float)data.getCost(arcy);
tablabel[y].pere=arcy;//ligne non dans le poly
if (tablabel[y].cout!=Float.MAX_VALUE) if (tablabel[y].cout!=Float.MAX_VALUE)
tas.remove(tablabel[y]); tas.remove(tablabel[y]);
//méthode à vérifier pour opérer update ou insert
tablabel[y].cout=tablabel[x].cout+(float)data.getCost(arcy);
tablabel[y].pere=arcy;//ligne non dans le poly
//méthode à vérifier pour opérer update ou insert (avec le if float.max plus haut)
tas.insert(tablabel[y]); tas.insert(tablabel[y]);
} }