conflit resolu
This commit is contained in:
Bezza Younes 2025-04-04 10:15:44 +02:00
commit 66462ee535

View file

@ -29,7 +29,8 @@ public class Path {
public static Path createFastestPathFromNodes(Graph graph, List<Node> nodes)
throws IllegalArgumentException {
List<Arc> arcs = new ArrayList<Arc>();
// TODO:
// TODO : faut faire en fct du maxspeed ds road information
return new Path(graph, arcs);
}
@ -217,11 +218,14 @@ public class Path {
* Compute the length of this path (in meters).
*
* @return Total length of the path (in meters).
* @deprecated Need to be implemented.
*
*/
public float getLength() {
// TODO:
return 0;
float pathLength=0f; // sinon error si on met O.O
for (Arc element : this.arcs) {
pathLength=pathLength+((float) element.getLength());
}
return pathLength;
}
/**
@ -230,11 +234,14 @@ public class Path {
* @param speed Speed to compute the travel time.
* @return Time (in seconds) required to travel this path at the given speed (in
* kilometers-per-hour).
* @deprecated Need to be implemented.
*
*/
public double getTravelTime(double speed) {
// TODO:
return 0;
double travelTime=0; // sinon error si on met O.O
for (Arc element : this.arcs) {
travelTime=travelTime+element.getTravelTime(speed);
}
return travelTime;
}
/**
@ -242,11 +249,14 @@ public class Path {
* every arc.
*
* @return Minimum travel time to travel this path (in seconds).
* @deprecated Need to be implemented.
*
*/
public double getMinimumTravelTime() {
// TODO:
return 0;
double minimumTravelTime=0;
for (Arc element : this.arcs) {
minimumTravelTime=minimumTravelTime+element.getMinimumTravelTime();
}
return minimumTravelTime;
}
}