-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathBackendInterface.java
More file actions
68 lines (59 loc) · 3.09 KB
/
Copy pathBackendInterface.java
File metadata and controls
68 lines (59 loc) · 3.09 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
import java.io.IOException;
import java.util.List;
public interface BackendInterface {
/*
* Implementing classes should support the constructor below.
* @param graph object to sture the backend's graph data
*/
// public BackendInterface(GraphADT<String,Double> graph);
/**
* Loads graph data from a dot file.
* @param filename the path to a dot file to read graph data from
* @throws IOException if there was a problem reading in the specified file
*/
public void loadGraphData(String filename) throws IOException;
/**
* Returns a list of all locations (nodes) available on the backend's graph.
* @return list of all location names
*/
public List<String> getListOfAllLocations();
/**
* Returns the sequence of locations along the shortest path from startLocation to endLocation, or
* en empty list if no such path exists.
* @param startLocation the start location of the path
* @param endLocation the end location of the path
* @return a list with the nodes along the shortest path from startLocation to endLocation, or
* an empty list if no such path exists
*/
public List<String> findShortestPath(String startLocation, String endLocation);
/**
* Returns the walking times in seconds between each two nodes on the shortest path from startLocation
* to endLocation, or an empty list of no such path exists.
* @param startLocation the start location of the path
* @param endLocation the end location of the path
* @return a list with the walking times in seconds between two nodes along the shortest path from
* startLocation to endLocation, or an empty list if no such path exists
*/
public List<Double> getTravelTimesOnPath(String startLocation, String endLocation);
/**
* Returns the sequence of locations along the shortest path from startLocation to endLocation including
* the third location viaLocation, or an empty list if no such path exists.
* en empty list if no such path exists.
* @param startLocation the start location of the path
* @param viaLocation a location that the path show lead through
* @param endLocation the end location of the path
* @return a list with the nodes along the shortest path from startLocation to endLocation including
* viaLocation, or an empty list if no such path exists
*/
public List<String> findShortestPathVia(String startLocation, String viaLocation, String endLocation);
/**
* Returns the walking times in seconds between each two nodes on the shortest path from startLocation
* to endLocation through viaLocation, or an empty list of no such path exists.
* @param startLocation the start location of the path
* @param viaLocation a location that the path show lead through
* @param endLocation the end location of the path
* @return a list with the walking times in seconds between two nodes along the shortest path from
* startLocation to endLocationthrough viaLocation, or an empty list if no such path exists
*/
public List<Double> getTravelTimesOnPathVia(String startLocation, String viaLocation, String endLocation);
}