National Transportation Consulting System by C + + on Linux

Source: Internet
Author: User

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


On the GitHub link:

National Transportation Consulting System by C + + on Linux

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.