Information Store
Using adjacency table to store city information and line information is more efficient than adjacency matrix.
Main data structures
I) time, the input and output format of the canonical times
II) Vnode, head node, for creating vertex tables, storing city information
III) Arcnode, table nodes, used to create edge tables, store arc-pointing city information, and line information
IV) InfoType, storage line information
V) Priority queue, precedence queues, for optimizing the insertion node of the Dijkstra algorithm and for removing the minimum weights that arrive at the corresponding points
Key Features and introduction
1. Query City number: The head node stores the number of the city corresponding to the vertex table when it is created
2. Manually add a city
3. read from file to add City
4. Deleting a city: Deleting a city requires deleting all the routes associated with the city
5. Export all cities
10. Update the city list: When the number of new cities and the number of cities that already exist is greater than MAXSIZE, need to open up space to store new cities and ++maxsize
7. Manually add lines
8. Insert Line: Because the line information is stored in the table node, you need to create a new table node and add a table corresponding to the starting city
9. Read the line from the file
10. Deleting a line
11. Find the least cost path
12. Find the minimum time path
Code
On the GitHub link: https://github.com/bw98/National-Transport-Advisory
National Transportation Consulting System by C + + on Linux