pcctest v4
This commit is contained in:
parent
a7c6478d67
commit
87d1d465a7
1 changed files with 5 additions and 29 deletions
|
|
@ -71,8 +71,8 @@ public class PCCTest{
|
||||||
|
|
||||||
for(int i = 0; i<3; i++)
|
for(int i = 0; i<3; i++)
|
||||||
{
|
{
|
||||||
graphs.set(i,new BinaryGraphReader(new DataInputStream(new BufferedInputStream(new FileInputStream(mapNames.get(i))))).read());
|
graphs.add(i,new BinaryGraphReader(new DataInputStream(new BufferedInputStream(new FileInputStream(mapNames.get(i))))).read());
|
||||||
paths.set(i,new BinaryPathReader(new DataInputStream(new BufferedInputStream(new FileInputStream(pathNames.get(i))))).readPath(graphs.get(i)));
|
paths.add(i,new BinaryPathReader(new DataInputStream(new BufferedInputStream(new FileInputStream(pathNames.get(i))))).readPath(graphs.get(i)));
|
||||||
}
|
}
|
||||||
/*
|
/*
|
||||||
graphs.add(new BinaryGraphReader(new DataInputStream(new BufferedInputStream(new FileInputStream(mapNames.get(0))))).read());
|
graphs.add(new BinaryGraphReader(new DataInputStream(new BufferedInputStream(new FileInputStream(mapNames.get(0))))).read());
|
||||||
|
|
@ -83,9 +83,9 @@ public class PCCTest{
|
||||||
paths.add(new BinaryPathReader(new DataInputStream(new BufferedInputStream(new FileInputStream(pathNames.get(2))))).readPath(graphs.get(2)));*/
|
paths.add(new BinaryPathReader(new DataInputStream(new BufferedInputStream(new FileInputStream(pathNames.get(2))))).readPath(graphs.get(2)));*/
|
||||||
// Creation des filtres
|
// Creation des filtres
|
||||||
|
|
||||||
arcInspectors.set(0, ArcInspectorFactory.getAllFilters().get(0)) ; //Sans Filtres
|
arcInspectors.add(0, ArcInspectorFactory.getAllFilters().get(0)) ; //Sans Filtres
|
||||||
arcInspectors.set(1, ArcInspectorFactory.getAllFilters().get(1)); //Voiture, longueur
|
arcInspectors.add(1, ArcInspectorFactory.getAllFilters().get(1)); //Voiture, longueur
|
||||||
arcInspectors.set(2, ArcInspectorFactory.getAllFilters().get(2)); //Voiture, temps
|
arcInspectors.add(2, ArcInspectorFactory.getAllFilters().get(2)); //Voiture, temps
|
||||||
|
|
||||||
//Créations des données pour les algos
|
//Créations des données pour les algos
|
||||||
|
|
||||||
|
|
@ -115,10 +115,6 @@ public class PCCTest{
|
||||||
bf = new BellmanFordAlgorithm(DataSF_INSA);
|
bf = new BellmanFordAlgorithm(DataSF_INSA);
|
||||||
assertEquals(bf.run(), dji.run());
|
assertEquals(bf.run(), dji.run());
|
||||||
|
|
||||||
dji = new DijkstraAlgorithm(DataSF_France);
|
|
||||||
bf = new BellmanFordAlgorithm(DataSF_France);
|
|
||||||
assertEquals(bf.run(), dji.run());
|
|
||||||
|
|
||||||
dji = new DijkstraAlgorithm(DataSF_HauteGaronne);
|
dji = new DijkstraAlgorithm(DataSF_HauteGaronne);
|
||||||
bf = new BellmanFordAlgorithm(DataSF_HauteGaronne);
|
bf = new BellmanFordAlgorithm(DataSF_HauteGaronne);
|
||||||
assertEquals(bf.run(), dji.run());
|
assertEquals(bf.run(), dji.run());
|
||||||
|
|
@ -133,10 +129,6 @@ public class PCCTest{
|
||||||
bf = new BellmanFordAlgorithm(DataVL_INSA);
|
bf = new BellmanFordAlgorithm(DataVL_INSA);
|
||||||
assertEquals(bf.run(), dji.run());
|
assertEquals(bf.run(), dji.run());
|
||||||
|
|
||||||
dji = new DijkstraAlgorithm(DataVL_France);
|
|
||||||
bf = new BellmanFordAlgorithm(DataVL_France);
|
|
||||||
assertEquals(bf.run(), dji.run());
|
|
||||||
|
|
||||||
dji = new DijkstraAlgorithm(DataVL_HauteGaronne);
|
dji = new DijkstraAlgorithm(DataVL_HauteGaronne);
|
||||||
bf = new BellmanFordAlgorithm(DataVL_HauteGaronne);
|
bf = new BellmanFordAlgorithm(DataVL_HauteGaronne);
|
||||||
assertEquals(bf.run(), dji.run());
|
assertEquals(bf.run(), dji.run());
|
||||||
|
|
@ -151,10 +143,6 @@ public class PCCTest{
|
||||||
bf = new BellmanFordAlgorithm(DataVT_INSA);
|
bf = new BellmanFordAlgorithm(DataVT_INSA);
|
||||||
assertEquals(bf.run(), dji.run());
|
assertEquals(bf.run(), dji.run());
|
||||||
|
|
||||||
dji = new DijkstraAlgorithm(DataVT_France);
|
|
||||||
bf = new BellmanFordAlgorithm(DataVT_France);
|
|
||||||
assertEquals(bf.run(), dji.run());
|
|
||||||
|
|
||||||
dji = new DijkstraAlgorithm(DataVT_HauteGaronne);
|
dji = new DijkstraAlgorithm(DataVT_HauteGaronne);
|
||||||
bf = new BellmanFordAlgorithm(DataVT_HauteGaronne);
|
bf = new BellmanFordAlgorithm(DataVT_HauteGaronne);
|
||||||
assertEquals(bf.run(), dji.run());
|
assertEquals(bf.run(), dji.run());
|
||||||
|
|
@ -169,10 +157,6 @@ public class PCCTest{
|
||||||
bf = new BellmanFordAlgorithm(DataSF_INSA);
|
bf = new BellmanFordAlgorithm(DataSF_INSA);
|
||||||
assertEquals(bf.run(), as.run());
|
assertEquals(bf.run(), as.run());
|
||||||
|
|
||||||
as = new AStarAlgorithm(DataSF_INSA);
|
|
||||||
bf = new BellmanFordAlgorithm(DataSF_France);
|
|
||||||
assertEquals(bf.run(), as.run());
|
|
||||||
|
|
||||||
as = new AStarAlgorithm(DataSF_HauteGaronne);
|
as = new AStarAlgorithm(DataSF_HauteGaronne);
|
||||||
bf = new BellmanFordAlgorithm(DataSF_HauteGaronne);
|
bf = new BellmanFordAlgorithm(DataSF_HauteGaronne);
|
||||||
assertEquals(bf.run(), as.run());
|
assertEquals(bf.run(), as.run());
|
||||||
|
|
@ -187,10 +171,6 @@ public class PCCTest{
|
||||||
bf = new BellmanFordAlgorithm(DataVL_INSA);
|
bf = new BellmanFordAlgorithm(DataVL_INSA);
|
||||||
assertEquals(bf.run(), as.run());
|
assertEquals(bf.run(), as.run());
|
||||||
|
|
||||||
as = new AStarAlgorithm(DataVL_INSA);
|
|
||||||
bf = new BellmanFordAlgorithm(DataVL_France);
|
|
||||||
assertEquals(bf.run(), as.run());
|
|
||||||
|
|
||||||
as = new AStarAlgorithm(DataVL_HauteGaronne);
|
as = new AStarAlgorithm(DataVL_HauteGaronne);
|
||||||
bf = new BellmanFordAlgorithm(DataVL_HauteGaronne);
|
bf = new BellmanFordAlgorithm(DataVL_HauteGaronne);
|
||||||
assertEquals(bf.run(), as.run());
|
assertEquals(bf.run(), as.run());
|
||||||
|
|
@ -205,10 +185,6 @@ public class PCCTest{
|
||||||
bf = new BellmanFordAlgorithm(DataVT_INSA);
|
bf = new BellmanFordAlgorithm(DataVT_INSA);
|
||||||
assertEquals(bf.run(), as.run());
|
assertEquals(bf.run(), as.run());
|
||||||
|
|
||||||
as = new AStarAlgorithm(DataVT_INSA);
|
|
||||||
bf = new BellmanFordAlgorithm(DataVT_France);
|
|
||||||
assertEquals(bf.run(), as.run());
|
|
||||||
|
|
||||||
as = new AStarAlgorithm(DataVT_HauteGaronne);
|
as = new AStarAlgorithm(DataVT_HauteGaronne);
|
||||||
bf = new BellmanFordAlgorithm(DataVT_HauteGaronne);
|
bf = new BellmanFordAlgorithm(DataVT_HauteGaronne);
|
||||||
assertEquals(bf.run(), as.run());
|
assertEquals(bf.run(), as.run());
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue