ShortestPathFunction

ShortestPathFunction[type,data]

表示一个函数,该函数给出一个图中从源顶点 s 到目标顶点 t 的最短路径.

更多信息

范例

打开所有单元关闭所有单元

基本范例  (1)

获得一个给出来自于顶点4的最短路径的函数:

使用它来显示到所有顶点的最短最短路径:

范围  (7)

ShortestPathFunction 适用于无向图:

有向图:

加权图:

ShortestPathFunction 可以给出来自于固定顶点的最短路径:

到固定的顶点:

在任意顶点对间:

当不存在路径时,ShortestPathFunction 返回 {}

Wolfram Research (2010),ShortestPathFunction,Wolfram 语言函数,https://reference.wolfram.com/language/ref/ShortestPathFunction.html.

文本

Wolfram Research (2010),ShortestPathFunction,Wolfram 语言函数,https://reference.wolfram.com/language/ref/ShortestPathFunction.html.

CMS

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

APA

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

BibTeX

@misc{reference.wolfram_2024_shortestpathfunction, author="Wolfram Research", title="{ShortestPathFunction}", year="2010", howpublished="\url{https://reference.wolfram.com/language/ref/ShortestPathFunction.html}", note=[Accessed: 22-November-2024 ]}

BibLaTeX

@online{reference.wolfram_2024_shortestpathfunction, organization={Wolfram Research}, title={ShortestPathFunction}, year={2010}, url={https://reference.wolfram.com/language/ref/ShortestPathFunction.html}, note=[Accessed: 22-November-2024 ]}