Skip to main content
. 2014 Aug 17;2014:481719. doi: 10.1155/2014/481719

Figure 2.

Figure 2

The shortest path faster algorithm. (a) Recording all nodes of G r in an adjacency list, starting from the source node. Adding the source into the queue Q, let D(source) = 0; (b) adding all the nodes that can be reached from source to Q and recording the cost values in D. (c) Adding all nodes that can be reached from k 1 to Q and recording their total cost values. If a node has been in queue Q, update its total cost value to the smaller value in D; (d) iterating (c) until queue Q is empty and the shortest path T = (k 1,…, k N), k NG r from source to sink can be obtained at the same time. Legend: black solid line, all edges among positions that can be reached, red solid line, all edges from the current position to potential locations that can be reached, black dashed line, all edges between virtual positions and the potential locations that can be reached, and red dashed line, all edges from the current position (or virtual positions) to virtual positions (or potential locations) that can be reached.