Этот коммит содержится в:
bezza 2025-05-26 19:08:17 +02:00
родитель 8f4633fde0
коммит 8d327ba36f
2 изменённых файлов: 12 добавлений и 7 удалений

Просмотреть файл

@ -118,7 +118,7 @@ import org.insa.graphs.model.Graph;
import org.insa.graphs.model.Node;
import org.insa.graphs.model.Path;
import org.insa.graphs.model.RoadInformation.RoadType;
//import org.insa.graphs.algorithm.shortestpath.ProblemeOuvert;
public class ProblemeOuvert extends DijkstraAlgorithm {

Просмотреть файл

@ -19,6 +19,7 @@ import org.insa.graphs.algorithm.shortestpath.ShortestPathData;
import org.insa.graphs.algorithm.shortestpath.ShortestPathSolution;
import org.insa.graphs.gui.drawing.Drawing;
import org.insa.graphs.gui.drawing.components.BasicDrawing;
import org.insa.graphs.gui.simple.Launch;
import org.insa.graphs.model.Graph;
import org.insa.graphs.model.Node;
import org.insa.graphs.model.Path;
@ -118,12 +119,16 @@ public class TestDijkstra {
coutPath = pathFromNodes.getLength();
}
if (type == 1) {
switch (type) {
case 1:
System.out.println("Coût DijkstraAstar: " + coutAlgo);
} else if (type == 2) {
break;
case 2:
System.out.println("Coût ProblemeOuvert: " + coutAlgo);
} else {
break;
default:
System.out.println("Coût Dijkstra: " + coutAlgo);
break;
}
boolean coutOk = Math.abs(coutAlgo - coutPath) < 1e-6; // pour comparer des réels