changements mineurs
This commit is contained in:
parent
8f4633fde0
commit
8d327ba36f
2 changed files with 12 additions and 7 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Reference in a new issue