Compare commits

...

2 commits

Author SHA1 Message Date
4700131542 m 2023-03-28 16:09:07 +02:00
2accc89628 m 2023-03-28 16:04:00 +02:00
2 changed files with 12 additions and 2 deletions

View file

@ -198,15 +198,22 @@ public class Path {
*
* @return true if the path is valid, false otherwise.
*
* @deprecated Need to be implemented.
*/
public boolean isValid() {
<<<<<<< HEAD
boolean valid=true;
for (int i=0; i<arcs.size()-1;i++){
if(arcs.get(i).getDestination() != arcs.get(i+1).getOrigin()){
valid=false;
=======
for (int i=0; i<arcs.size()-1;i++){
if(arcs.get(i).getDestination() != arcs.get(i+1).getOrigin()){
return false;
>>>>>>> 9512825678cb119a068d94f8af261d356638dbdd
}
}
return true;
return valid;
}
/**
@ -236,6 +243,8 @@ public class Path {
<<<<<<< HEAD
=======
<<<<<<< HEAD
=======
<<<<<<< HEAD
=======
<<<<<<< HEAD
@ -244,6 +253,7 @@ public class Path {
>>>>>>> 052958ee6eb4821ebbb9c903780d467d62617fd2
>>>>>>> 661162456a46270c315c09521ce09f85f0020150
>>>>>>> 534e0b728e13a532d629312ec48c8c6185679721
>>>>>>> 9512825678cb119a068d94f8af261d356638dbdd
*/
public double getTravelTime(double speed) {
double TotalTime = 0;