Length
Этот коммит содержится в:
коммит
ce66d2162b
2 изменённых файлов: 6 добавлений и 2 удалений
|
|
@ -210,7 +210,7 @@ public class Path {
|
||||||
*
|
*
|
||||||
* @return Total length of the path (in meters).
|
* @return Total length of the path (in meters).
|
||||||
*
|
*
|
||||||
* @deprecated Need to be implemented.
|
*
|
||||||
*/
|
*/
|
||||||
public float getLength() {
|
public float getLength() {
|
||||||
// TODO:
|
// TODO:
|
||||||
|
|
@ -232,7 +232,11 @@ public class Path {
|
||||||
* @deprecated Need to be implemented.
|
* @deprecated Need to be implemented.
|
||||||
*/
|
*/
|
||||||
public double getTravelTime(double speed) {
|
public double getTravelTime(double speed) {
|
||||||
return speed/(getLength()*3.6);
|
double TotalTime = 0;
|
||||||
|
for (Arc a : arcs){
|
||||||
|
TotalTime += a.getTravelTime(speed);
|
||||||
|
}
|
||||||
|
return TotalTime;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
||||||
Двоичные данные
be-graphes-model/target/classes/org/insa/graphs/model/Path.class
Двоичные данные
be-graphes-model/target/classes/org/insa/graphs/model/Path.class
Двоичный файл не отображается.
Загрузка…
Сослаться в новой задаче