|
SOLUTIONS
|
MATHEMATICA 組込みシンボル
FindShortestPath
FindShortestPath[g, s, t]
グラフ g 中のソース頂点 s からターゲット頂点 t までの最短経路を求める.
FindShortestPath[g, s, All]
異なる t に繰り返し適用できるShortestPathFunction[...]を生成する.
FindShortestPath[g, All, t]
異なる s に繰り返し適用できるShortestPathFunction[...]を生成する.
FindShortestPath[g, All, All]
異なる s と t に繰り返し適用できるShortestPathFunction[...]を生成する.
詳細とオプション詳細とオプション
- FindShortestPath[g, s, t]は s から t までの経路を与える.
- FindShortestPath[g, s]はFindShortestPath[g, s, All]に等しい.
- FindShortestPath[g]はFindShortestPath[g, All, All]に等しい.
- 重みなしのグラフの場合,辺の長さは1であるとみなされる.
- 重み付きのグラフの場合,辺の長さはその重みであるとみなされる.
- Methodを与えることもできる.使用可能なMethodの設定値:
-
"BellmanFord" 正負の重みをサポート "Dijkstra" 正の重みをサポート
バージョン 8 の新機能
Mathematica 9 is now available!
New to Mathematica?
Find your learning path »
Have a question?
Ask support »


