When performing route computing, we need to solve the problem of finding all the paths between two points ., For example, all paths between 0 and 11 are required. The adjacent relationship is already in the file named "nodetable1.txt ". Similar to a route neighbor table between all nodes and 11. In this table, only one number in a row indicates the vertex number (to subtract 100, for example, 102 corresponds to node 2 ). There are two numbers indicating the route adjacent items under this node (the first number indicates the destination point to go, and the second number indicates the next node to go to this destination. For details, see the following description)
102 (minus 100, indicating Node 2)
11 5 (the target node is node 11 and the next node to go to the target node is node 5)
11 6 (the target node is node 11 and the next node to go to the target node is node 6)
Obviously, this is an adjacent relationship in the figure.
Note: All Tables whose Calculation targets are node 11 (this is because all table items in node nodetable1.txt are directed to node 11 ). To run the program, you must enter the start point. For example, if you enter 0, all the paths from node 0 to node 11 are calculated. The running result is as follows:
++
The first path is: 0 --> 1 --> 4 --> 11
The first path is: 0 --> 1 --> 3 --> 11
The first path is: 0 --> 1 --> 2 --> 6 --> 10 --> 11
The first path is: 0 --> 1 --> 2 --> 6 --> 9 --> 11
The first path is: 0 --> 1 --> 2 --> 5 --> 8 --> 11
The first path is: 0 --> 1 --> 2 --> 5 --> 7 --> 11
++
......
And so on.
For details about the program, see:Http://download.csdn.net/source/2499950