|
SOLUTIONS
|
COMBINATORICA 程序包 符号
ShortestPathSpanningTree
![]()
constructs a shortest-path spanning tree rooted at v, so that a shortest path in graph g from v to any other vertex is a path in the tree.
更多信息更多信息
- To use
, you first need to load the Combinatorica Package using Needs["Combinatorica`"]. - An option Algorithm that takes on the values Automatic, Dijkstra, or BellmanFord is provided. This allows a choice between Dijkstra's algorithm and the Bellman-Ford algorithm.
- The default is Algorithm->Automatic. In this case, depending on whether edges have negative weights and depending on the density of the graph, the algorithm chooses between BellmanFord and Dijkstra.
Mathematica 9 is now available!
New to Mathematica?
Find your learning path »
Have a question?
Ask support »
