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.
引用格式
Yi Wang (2026). Dijkstra Algorithm Consistent with Cyclic Paths (https://ww2.mathworks.cn/matlabcentral/fileexchange/7869-dijkstra-algorithm-consistent-with-cyclic-paths), MATLAB Central File Exchange. 检索时间: .
致谢
| 版本 | 已发布 | 发行说明 | Action |
|---|---|---|---|
| 1.0.0.0 | corrent Summary |
