This commit is contained in:
El Haji Fofana 2023-04-19 13:39:16 +02:00
commit d751d66e7a
2 changed files with 2 additions and 2 deletions

View file

@ -45,9 +45,9 @@ public class DijkstraAlgorithm extends ShortestPathAlgorithm {
if(!l.marque){ if(!l.marque){
double cout = l.getCost(); double cout = l.getCost();
System.out.println("c = " + cout); 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("l = " + l.getCost());
System.out.println("x = " + x.cost); System.out.println("x = " + x.getCost());
if(cout != l.getCost()){ if(cout != l.getCost()){
if (arcs.size() < i ){ if (arcs.size() < i ){
System.out.println("arc"); System.out.println("arc");