2011-11-15から1日間の記事一覧
Boost.GraphにはEvent Visitorという機能があって、最短経路を計算するアルゴリズム内の各ポイントの情報を取得することができます。 ここでは、ダイクストラ法の最短経路計算で、頂点を調べる順番を調べてみます。 #include <iostream> #include <boost/graph/adjacency_list.hpp> #include <boost/graph/dijkstra_shortest_paths.hpp> #include <boost/assign/list_of.hpp></boost/assign/list_of.hpp></boost/graph/dijkstra_shortest_paths.hpp></boost/graph/adjacency_list.hpp></iostream>…