This commit is contained in:
Bensouda Idriss 2023-04-19 13:37:22 +02:00
parent 4770aa30f6
commit d7ca7a2be8
2 changed files with 2 additions and 2 deletions

View file

@ -45,9 +45,9 @@ public class DijkstraAlgorithm extends ShortestPathAlgorithm {
if(!l.marque){
double cout = l.getCost();
System.out.println("c = " + cout);
l.cost = Math.min(l.getCost(), x.getCost()+suivant.getLength());
l.setCost(Math.min(l.getCost(), x.getCost()+suivant.getLength()));
System.out.println("l = " + l.getCost());
System.out.println("x = " + x.cost);
System.out.println("x = " + x.getCost());
if(cout != l.getCost()){
if (arcs.size() < i ){
System.out.println("arc");