Combinatorica`
Combinatorica`
ShortestPathSpanningTree
As of Version 10, most of the functionality of the Combinatorica package is built into the Wolfram System. »
ShortestPathSpanningTree[g,v]
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.
更多信息和选项
- ShortestPathSpanningTree functionality is now available in the built-in Wolfram Language function FindSpanningTree.
- To use ShortestPathSpanningTree, 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.
范例
基本范例 (2)
ShortestPathSpanningTree has been superseded by FindSpanningTree:
Wolfram Research (2012),ShortestPathSpanningTree,Wolfram 语言函数,https://reference.wolfram.com/language/Combinatorica/ref/ShortestPathSpanningTree.html.
文本
Wolfram Research (2012),ShortestPathSpanningTree,Wolfram 语言函数,https://reference.wolfram.com/language/Combinatorica/ref/ShortestPathSpanningTree.html.
CMS
Wolfram 语言. 2012. "ShortestPathSpanningTree." Wolfram 语言与系统参考资料中心. Wolfram Research. https://reference.wolfram.com/language/Combinatorica/ref/ShortestPathSpanningTree.html.
APA
Wolfram 语言. (2012). ShortestPathSpanningTree. Wolfram 语言与系统参考资料中心. 追溯自 https://reference.wolfram.com/language/Combinatorica/ref/ShortestPathSpanningTree.html 年