|
@@ -25,7 +25,7 @@ public class Path {
|
25
|
25
|
* @throws IllegalArgumentException If the list of nodes is not valid, i.e. two
|
26
|
26
|
* consecutive nodes in the list are not connected in the graph.
|
27
|
27
|
*
|
28
|
|
- * @deprecated Need to be implement.
|
|
28
|
+ * @deprecated Need to be implemented.
|
29
|
29
|
*/
|
30
|
30
|
public static Path createFastestPathFromNodes(Graph graph, List<Node> nodes)
|
31
|
31
|
throws IllegalArgumentException {
|
|
@@ -46,7 +46,7 @@ public class Path {
|
46
|
46
|
* @throws IllegalArgumentException If the list of nodes is not valid, i.e. two
|
47
|
47
|
* consecutive nodes in the list are not connected in the graph.
|
48
|
48
|
*
|
49
|
|
- * @deprecated Need to be implement.
|
|
49
|
+ * @deprecated Need to be implemented.
|
50
|
50
|
*/
|
51
|
51
|
public static Path createShortestPathFromNodes(Graph graph, List<Node> nodes)
|
52
|
52
|
throws IllegalArgumentException {
|
|
@@ -173,13 +173,18 @@ public class Path {
|
173
|
173
|
/**
|
174
|
174
|
* Check if this path is valid.
|
175
|
175
|
*
|
176
|
|
- * A path is valid if it is empty, contains a single node (without arcs) or if
|
177
|
|
- * the first arc has for origin the origin of the path and, for two consecutive
|
178
|
|
- * arcs, the destination of the first one is the origin of the second one.
|
|
176
|
+ * A path is valid if any of the following is true:
|
|
177
|
+ * <ul>
|
|
178
|
+ * <li>it is empty;</li>
|
|
179
|
+ * <li>it contains a single node (without arcs);</li>
|
|
180
|
+ * <li>the first arc has for origin the origin of the path and, for two
|
|
181
|
+ * consecutive arcs, the destination of the first one is the origin of the
|
|
182
|
+ * second one.</li>
|
|
183
|
+ * </ul>
|
179
|
184
|
*
|
180
|
185
|
* @return true if the path is valid, false otherwise.
|
181
|
186
|
*
|
182
|
|
- * @deprecated Need to be implement.
|
|
187
|
+ * @deprecated Need to be implemented.
|
183
|
188
|
*/
|
184
|
189
|
public boolean isValid() {
|
185
|
190
|
// TODO:
|
|
@@ -187,9 +192,11 @@ public class Path {
|
187
|
192
|
}
|
188
|
193
|
|
189
|
194
|
/**
|
190
|
|
- * @return Total length of the path.
|
|
195
|
+ * Compute the length of this path (in meters).
|
191
|
196
|
*
|
192
|
|
- * @deprecated Need to be implement.
|
|
197
|
+ * @return Total length of the path (in meters).
|
|
198
|
+ *
|
|
199
|
+ * @deprecated Need to be implemented.
|
193
|
200
|
*/
|
194
|
201
|
public float getLength() {
|
195
|
202
|
// TODO:
|
|
@@ -204,7 +211,7 @@ public class Path {
|
204
|
211
|
* @return Time (in seconds) required to travel this path at the given speed (in
|
205
|
212
|
* kilometers-per-hour).
|
206
|
213
|
*
|
207
|
|
- * @deprecated Need to be implement.
|
|
214
|
+ * @deprecated Need to be implemented.
|
208
|
215
|
*/
|
209
|
216
|
public double getTravelTime(double speed) {
|
210
|
217
|
// TODO:
|
|
@@ -212,9 +219,12 @@ public class Path {
|
212
|
219
|
}
|
213
|
220
|
|
214
|
221
|
/**
|
215
|
|
- * @return Minimum travel time of the in seconds (assuming maximum speed).
|
|
222
|
+ * Compute the time to travel this path if moving at the maximum allowed speed
|
|
223
|
+ * on every arc.
|
|
224
|
+ *
|
|
225
|
+ * @return Minimum travel time to travel this path (in seconds).
|
216
|
226
|
*
|
217
|
|
- * @deprecated Need to be implement.
|
|
227
|
+ * @deprecated Need to be implemented.
|
218
|
228
|
*/
|
219
|
229
|
public double getMinimumTravelTime() {
|
220
|
230
|
// TODO:
|