|--data--
|
--data_project (Store input airport files and routes files)
|--entry--
|
--main.cpp (file for user to execute the program )
|--lib (store cs255 and lodepeng that are copied from mp_maze)
|--src (file to store all function declaratons and defintions[code])
|--tests (store test suites)
|--result (store the output(result) )
|--README.md (running instructions and program organization)
|--result.md (written report)
git clone https://github.com/YQiu-oo/yunheyue_final_project.git
mkdir build
cd build
cmake ..
execute the program with make first or make main, then there are two required arguments for user to input: ** Notice **
- the data file for airport
execute the program with
make
first ormake main
, there are two required data file for user to input: - the location of data file for airports.
- the location of data file for routes.
Notice : All input data files should put into the data --> data_project
folders, the format will look like this: ../data/data_project/airports.dat
make | make main
./main [your airport data file path] [your routes data file path]
Then it will pop up all options for user to select :
All test suites are in the tests folder, there are two testing file:
- test_graph.cpp, there are 8 test cases for the follwing:
- BFS (bread first search)
- Floyd Warshall Algorithm
- Adjacency Matrix
- test_data.cpp, there are 4 test cases for the follwing:
- read_airports_file
- read_routes_file
make test
./test
First make main, and use ./main first.dat second.dat to input the data set you want.
Input 1 to test shortest path by distance. Input Wewak as source airport, and input 0 to choose the first airport in this city.Then Input Sondrestrom as destination airport and input 0 to choose the first airport in this city.
The route in word and the route in graph are generate
Input 2 to test shortest path by number of stops. Input Wewak as source airport, and input 0 to choose the first airport in this city.Then Input Sondrestrom as destination airport and input 0 to choose the first airport in this city.
The route in word and the route in graph are generate
Input 0 to exist the program