ShortestPath[g,start,end]
グラフ g の頂点 start と end の間の最短経路を見付ける.
ShortestPath
ShortestPath[g,start,end]
グラフ g の頂点 start と end の間の最短経路を見付ける.
詳細とオプション
- ShortestPathの機能はWolfram言語の組込み関数FindShortestPathで利用できるようになった.
- ShortestPathを使うためには,まず Combinatorica パッケージをロードしなくてはならない.それにはNeeds["Combinatorica`"]を実行する必要がある.
- 値Automatic,Dijkstra,BellmanFordのいずれかを取るオプションAlgorithmが提供される.これにより,Dijkstraのアルゴリズムを使うか,Bellman–Fordアルゴリズムを使うかを選択することができる
- デフォルトはAlgorithm->Automaticである.この場合,辺が負の重みを持つかどうかにより,またグラフの密度に基づいて,アルゴリズムがBellmanFordとDijkstraのどちらかを選ぶ.
例題
例 (2)
ShortestPathの代りにFindShortestPathが使われるようになった:
テクニカルノート
関連するガイド
-
▪
- グラフアルゴリズム ▪
- Combinatorica パッケージ ▪
- グラフとネットワーク ▪
- グラフの可視化 ▪
- グラフ上の計算 ▪
- グラフの構築と表現 ▪
- グラフと行列 ▪
- グラフの特性と測定 ▪
- グラフの操作と変更 ▪
- ランダムグラフ ▪
- ソーシャルネットワーク分析 ▪
- グラフの特性 ▪
- 数学データ形式 ▪
- 離散数学
テキスト
Wolfram Research (2012), ShortestPath, Wolfram言語関数, https://reference.wolfram.com/language/Combinatorica/ref/ShortestPath.html.
CMS
Wolfram Language. 2012. "ShortestPath." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/Combinatorica/ref/ShortestPath.html.
APA
Wolfram Language. (2012). ShortestPath. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/Combinatorica/ref/ShortestPath.html
BibTeX
@misc{reference.wolfram_2025_shortestpath, author="Wolfram Research", title="{ShortestPath}", year="2012", howpublished="\url{https://reference.wolfram.com/language/Combinatorica/ref/ShortestPath.html}", note=[Accessed: 01-April-2026]}
BibLaTeX
@online{reference.wolfram_2025_shortestpath, organization={Wolfram Research}, title={ShortestPath}, year={2012}, url={https://reference.wolfram.com/language/Combinatorica/ref/ShortestPath.html}, note=[Accessed: 01-April-2026]}