Dijkstra Algorithm Consistent with Cyclic Paths description |
|
|
Dijkstra Algorithm Consistent with Cyclic Paths - This function and attached examples show finding shortest-paths (including cyclic paths) from a dire Given adjacent matrix (transmat) and starting/ending node (pathS, pathE), this function finds the shortest-path (path) that connecting pathS and pathE, and returns the cost (cost):
[path, cost]=dijkstra(pathS, pathE, transmat);
NOTE: Except for the simple interface, the pathS and pathE can be the same node, i.e., this implementation can find _cyclic_ paths.
|
|