Combinatorica`
Combinatorica`

AllPairsShortestPath

As of Version 10, most of the functionality of the Combinatorica package is built into the Wolfram System. »

AllPairsShortestPath[g]

gives a matrix, where the ^(th) entry is the length of a shortest path in g between vertices and .

AllPairsShortestPath[g,Parent]

returns a three-dimensional matrix with dimensions 2*V[g]*V[g], in which the ^(th) entry is the length of a shortest path from to and the ^(th) entry is the predecessor of in a shortest path from to .

更多信息和选项

范例

基本范例  (2)

AllPairsShortestPath has been superseded by GraphDistanceMatrix:

Wolfram Research (2012),AllPairsShortestPath,Wolfram 语言函数,https://reference.wolfram.com/language/Combinatorica/ref/AllPairsShortestPath.html.

文本

Wolfram Research (2012),AllPairsShortestPath,Wolfram 语言函数,https://reference.wolfram.com/language/Combinatorica/ref/AllPairsShortestPath.html.

CMS

Wolfram 语言. 2012. "AllPairsShortestPath." Wolfram 语言与系统参考资料中心. Wolfram Research. https://reference.wolfram.com/language/Combinatorica/ref/AllPairsShortestPath.html.

APA

Wolfram 语言. (2012). AllPairsShortestPath. Wolfram 语言与系统参考资料中心. 追溯自 https://reference.wolfram.com/language/Combinatorica/ref/AllPairsShortestPath.html 年

BibTeX

@misc{reference.wolfram_2024_allpairsshortestpath, author="Wolfram Research", title="{AllPairsShortestPath}", year="2012", howpublished="\url{https://reference.wolfram.com/language/Combinatorica/ref/AllPairsShortestPath.html}", note=[Accessed: 21-November-2024 ]}

BibLaTeX

@online{reference.wolfram_2024_allpairsshortestpath, organization={Wolfram Research}, title={AllPairsShortestPath}, year={2012}, url={https://reference.wolfram.com/language/Combinatorica/ref/AllPairsShortestPath.html}, note=[Accessed: 21-November-2024 ]}