Contributors: Hanpu Liu, Jake Cheng, Peter, Dekai.
Our project uses the openflights data set from https://openflights.org/data.html to perform two main algorithms: Dijkstra and Page Rank. We first appended the routes dataset to include the flight distance at the last column. With that, we created a graph using adjacency list and implemented Breadth First Search to check if airports are connected, as well as Dijkstra algorithm to find the shortest path between airports and retrieve the path. Lastly, we have a PageRank function that can output the N most popular airports in the dataset.
entry: processdata.cpp to process data, main.cpp as main entry point, test.cpp as tests for correctness
src: routefinder(Class that represents the data, construct graph, BFS and Dijkstra, PageRank are all functions in routefinder), utils(routelength.h to compute length, misc.cpp contains functions such as string parsing)
Presentation video is linked at: https://www.youtube.com/watch?v=xfpNRprdqdg
- Clone the repository
- Make a build directory in the main project folder
- Run
cmake ..
in the build directory to generate the makefiles - Run
make
to make all entry points, ormake main
/make test
/make processdata
to make the individual entrypoints
- You can make and run the test file, and the correct output is included as comments in the test.cpp file.