p_tan's blog

勉強日記です。ツッコミ大歓迎

2010-10-01から1ヶ月間の記事一覧

グラフアルゴリズムの使用方法:ダイクストラの最短パスアルゴリズム

グラフアルゴリズムの使用例としてダイクストラの最短パスを使う。以下サンプルコード #include <iostream> #include <boost/graph/graph_traits.hpp> #include <boost/graph/adjacency_list.hpp> #include <boost/graph/dijkstra_shortest_paths.hpp> #include <boost/property_map/vector_property_map.hpp> #include <boost/foreach.hpp> using namespace std; us…</boost/foreach.hpp></boost/property_map/vector_property_map.hpp></boost/graph/dijkstra_shortest_paths.hpp></boost/graph/adjacency_list.hpp></boost/graph/graph_traits.hpp></iostream>