Launch.java
This commit is contained in:
parent
4345b03ba0
commit
30bf791092
1 changed files with 10 additions and 5 deletions
|
@ -15,6 +15,8 @@ import org.insa.graphs.model.Graph;
|
|||
import org.insa.graphs.model.Path;
|
||||
import org.insa.graphs.model.io.BinaryGraphReader;
|
||||
import org.insa.graphs.model.io.GraphReader;
|
||||
import org.insa.graphs.model.io.BinaryPathReader;
|
||||
|
||||
import org.insa.graphs.model.io.PathReader;
|
||||
|
||||
public class Launch {
|
||||
|
@ -46,28 +48,31 @@ public class Launch {
|
|||
public static void main(String[] args) throws Exception {
|
||||
|
||||
// Visit these directory to see the list of available files on Commetud.
|
||||
final String mapName = "/home/commetud/3eme Annee MIC/Graphes-et-Algorithmes/Maps/insa.mapgr";
|
||||
final String pathName = "/home/commetud/3eme Annee MIC/Graphes-et-Algorithmes/Paths/path_fr31insa_rangueil_r2.path";
|
||||
final String mapName = "/mnt/commetud/3eme Annee MIC/Graphes-et-Algorithmes/Maps/insa.mapgr";
|
||||
final String pathName = "/mnt/commetud/3eme Annee MIC/Graphes-et-Algorithmes/Paths/path_fr31insa_rangueil_r2.path";
|
||||
|
||||
// Create a graph reader.
|
||||
final GraphReader reader = new BinaryGraphReader(
|
||||
new DataInputStream(new BufferedInputStream(new FileInputStream(mapName))));
|
||||
|
||||
// TODO: Read the graph.
|
||||
final Graph graph = null;
|
||||
final Graph graph = reader.read();
|
||||
|
||||
// Create the drawing:
|
||||
final Drawing drawing = createDrawing();
|
||||
|
||||
// TODO: Draw the graph on the drawing.
|
||||
drawing.drawGraph(graph);
|
||||
|
||||
// TODO: Create a PathReader.
|
||||
final PathReader pathReader = null;
|
||||
final PathReader pathReader = new BinaryPathReader(
|
||||
new DataInputStream(new BufferedInputStream(new FileInputStream(pathName))));
|
||||
|
||||
// TODO: Read the path.
|
||||
final Path path = null;
|
||||
final Path path = pathReader.readPath(graph);
|
||||
|
||||
// TODO: Draw the path.
|
||||
drawing.drawPath(path);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue