dijkstra: add statistics for time and co2

This commit is contained in:
Marco Thomas
2022-07-27 17:35:49 +02:00
parent de34b3acce
commit 68885ff560
4 changed files with 43 additions and 19 deletions

View File

@@ -83,6 +83,9 @@ class Location:
math.cos(lat1) * math.cos(lat2) * math.cos(long2 - long1)
return rErde * math.acos(inner)
def is_same_continent(self, loc2) -> bool:
return self.continent == loc2.continent
class DataSet:
def __init__(self, locations: dict, flights: dict, connection: tuple):