Dijkstra fonctionnel, enfin
This commit is contained in:
parent
a1784cc36c
commit
91e3152d6d
1 changed files with 4 additions and 4 deletions
|
@ -54,12 +54,12 @@ public class DijkstraAlgorithm extends ShortestPathAlgorithm {
|
|||
|
||||
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)
|
||||
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]);
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue