test de Dijkstra et A* deplaces dans les tests
This commit is contained in:
parent
2b4130887c
commit
3a6de0eddb
2 changed files with 6 additions and 6 deletions
|
@ -1,4 +1,4 @@
|
|||
package org.insa.graphes.model;
|
||||
package org.insa.graphs.algorithm.utils;
|
||||
|
||||
import static org.junit.Assert.assertEquals;
|
||||
import static org.junit.Assert.assertFalse;
|
|
@ -1,14 +1,13 @@
|
|||
package org.insa.graphs.gui.simple;
|
||||
|
||||
package org.insa.graphs.algorithm.utils;
|
||||
import java.io.*;
|
||||
import org.insa.graphs.model.*;
|
||||
import org.insa.graphs.model.io.*;
|
||||
import org.insa.graphs.algorithm.shortestpath.*;
|
||||
|
||||
import org.insa.graphs.algorithm.ArcInspectorFactory;
|
||||
import org.insa.graphs.algorithm.AbstractSolution.Status;
|
||||
import org.insa.graphs.algorithm.ArcInspector;
|
||||
|
||||
@SuppressWarnings("deprecation")
|
||||
@Test
|
||||
public class DijkstraTest {
|
||||
|
||||
public static void main(String[] args) throws Exception {
|
||||
|
@ -34,8 +33,9 @@ public class DijkstraTest {
|
|||
// === données pour Dijkstra ===
|
||||
Node origin = referencePath.getOrigin();
|
||||
Node destination = referencePath.getDestination();
|
||||
ArcInspector inspector = ArcInspectorFactory.getAllFilters().get(0); // Indice 0 = "Shortest path, all roads allowed"
|
||||
ShortestPathData data = new ShortestPathData(graph, origin, destination, inspector);
|
||||
|
||||
ShortestPathData data = new ShortestPathData(graph, origin, destination, ArcInspectorFactory.getAllFilters().get(0));
|
||||
DijkstraAlgorithm dijkstra = new DijkstraAlgorithm(data);
|
||||
|
||||
// === Exécution de l'algorithme ===
|
Loading…
Reference in a new issue