Solve shortest path problem in graph
[
determines
the shortest paths from the source node dist
,path
,pred
] = graphshortestpath(G
,S
) S
to all other nodes in
the graph G
. dist
contains the distances from the
source node to all other nodes. path
contains the shortest paths to
every node. pred
contains the predecessor nodes of the shortest
paths.
[___] = graphshortestpath(___,
specifies additional options using one or more name-value pair arguments. Specify name-value
pair arguments after any of the input argument combinations in the previous syntaxes.Name,Value
)
[1] Dijkstra, E. W. "A Note on Two Problems in Connexion with Graphs." Numerische Mathematik. Vol. 1, Number 1, 1959, pp. 269–271.
[2] Bellman, R. "On a Routing Problem." Quarterly of Applied Mathematics. Vol. 16, Number 1, pp. 87–90.
[3] Siek, J. G., L. Q. Lee, and A. Lumsdaine. The Boost Graph Library: User Guide and Reference Manual. Upper Saddle River, NJ: Pearson Education, 2002.
graphallshortestpaths
| graphconncomp
| graphisdag
| graphisomorphism
| graphisspantree
| graphmaxflow
| graphminspantree
| graphpred2path
| graphtopoorder
| graphtraverse
| shortestpath