Update Path javadoc.

This commit is contained in:
Mikael Capelle 2018-03-13 17:27:20 +01:00
parent 2a2cf413ba
commit 73f1c6bd78
2 changed files with 24 additions and 11 deletions

View File

@ -46,6 +46,9 @@ public abstract class Arc {
} }
/** /**
* Compute and return the minimum time required to travel this arc, or the time
* required to travel this arc at the maximum speed allowed.
*
* @return Minimum time required to travel this arc, in seconds. * @return Minimum time required to travel this arc, in seconds.
* *
* @see Arc#getTravelTime(double) * @see Arc#getTravelTime(double)

View File

@ -25,7 +25,7 @@ public class Path {
* @throws IllegalArgumentException If the list of nodes is not valid, i.e. two * @throws IllegalArgumentException If the list of nodes is not valid, i.e. two
* consecutive nodes in the list are not connected in the graph. * consecutive nodes in the list are not connected in the graph.
* *
* @deprecated Need to be implement. * @deprecated Need to be implemented.
*/ */
public static Path createFastestPathFromNodes(Graph graph, List<Node> nodes) public static Path createFastestPathFromNodes(Graph graph, List<Node> nodes)
throws IllegalArgumentException { throws IllegalArgumentException {
@ -46,7 +46,7 @@ public class Path {
* @throws IllegalArgumentException If the list of nodes is not valid, i.e. two * @throws IllegalArgumentException If the list of nodes is not valid, i.e. two
* consecutive nodes in the list are not connected in the graph. * consecutive nodes in the list are not connected in the graph.
* *
* @deprecated Need to be implement. * @deprecated Need to be implemented.
*/ */
public static Path createShortestPathFromNodes(Graph graph, List<Node> nodes) public static Path createShortestPathFromNodes(Graph graph, List<Node> nodes)
throws IllegalArgumentException { throws IllegalArgumentException {
@ -173,13 +173,18 @@ public class Path {
/** /**
* Check if this path is valid. * Check if this path is valid.
* *
* A path is valid if it is empty, contains a single node (without arcs) or if * A path is valid if any of the following is true:
* the first arc has for origin the origin of the path and, for two consecutive * <ul>
* arcs, the destination of the first one is the origin of the second one. * <li>it is empty;</li>
* <li>it contains a single node (without arcs);</li>
* <li>the first arc has for origin the origin of the path and, for two
* consecutive arcs, the destination of the first one is the origin of the
* second one.</li>
* </ul>
* *
* @return true if the path is valid, false otherwise. * @return true if the path is valid, false otherwise.
* *
* @deprecated Need to be implement. * @deprecated Need to be implemented.
*/ */
public boolean isValid() { public boolean isValid() {
// TODO: // TODO:
@ -187,9 +192,11 @@ public class Path {
} }
/** /**
* @return Total length of the path. * Compute the length of this path (in meters).
* *
* @deprecated Need to be implement. * @return Total length of the path (in meters).
*
* @deprecated Need to be implemented.
*/ */
public float getLength() { public float getLength() {
// TODO: // TODO:
@ -204,7 +211,7 @@ public class Path {
* @return Time (in seconds) required to travel this path at the given speed (in * @return Time (in seconds) required to travel this path at the given speed (in
* kilometers-per-hour). * kilometers-per-hour).
* *
* @deprecated Need to be implement. * @deprecated Need to be implemented.
*/ */
public double getTravelTime(double speed) { public double getTravelTime(double speed) {
// TODO: // TODO:
@ -212,9 +219,12 @@ public class Path {
} }
/** /**
* @return Minimum travel time of the in seconds (assuming maximum speed). * Compute the time to travel this path if moving at the maximum allowed speed
* on every arc.
* *
* @deprecated Need to be implement. * @return Minimum travel time to travel this path (in seconds).
*
* @deprecated Need to be implemented.
*/ */
public double getMinimumTravelTime() { public double getMinimumTravelTime() {
// TODO: // TODO: