dfs アルゴリズムを使用してグラフの検索ツリーを作成したいと思います。コンパイル エラーが何度も発生します。コードは次のようになります (コンパイル エラーが長すぎて、貼り付けません)。
typedef adjacency_list <vecS, vecS, undirectedS> Graph;
typedef graph_traits <Graph>::edge_descriptor Edge;
typedef graph_traits <Graph>::vertex_descriptor Vertex;
typedef pair<int, int> E;
vector<E> edges;
Graph g(edges.begin(), edges.end(), n);
vector<Vertex> p(n);
Vertex s = vertex(0,g);
breadth_first_search(g, s, visitor(record_predecessors(&p[0], on_tree_edge())));
エラーの一部:
instantiated from here
/usr/include/boost/graph/breadth_first_search.hpp:39:7: error: ‘struct boost::predecessor_recorder<long unsigned int*, boost::on_tree_edge>’ has no member named ‘initialize_vertex’
/usr/include/boost/graph/breadth_first_search.hpp:40:7: error: ‘struct boost::predecessor_recorder<long unsigned int*, boost::on_tree_edge>’ has no member named ‘discover_vertex’
/usr/include/boost/graph/breadth_first_search.hpp:41:7: error: ‘struct boost::predecessor_recorder<long unsigned int*, boost::on_tree_edge>’ has no member named ‘examine_vertex’
/usr/include/boost/graph/breadth_first_search.hpp:42:7: error: ‘struct boost::predecessor_recorder<long unsigned int*, boost::on_tree_edge>’ has no member named ‘examine_edge’
/usr/include/boost/graph/breadth_first_search.hpp:43:7: error: ‘struct boost::predecessor_recorder<long unsigned int*, boost::on_tree_edge>’ has no member named ‘tree_edge’
/usr/include/boost/graph/breadth_first_search.hpp:44:7: error: ‘struct boost::predecessor_recorder<long unsigned int*, boost::on_tree_edge>’ has no member named ‘non_tree_edge’
/usr/include/boost/graph/breadth_first_search.hpp:45:7: error: ‘struct boost::predecessor_recorder<long unsigned int*, boost::on_tree_edge>’ has no member named ‘gray_target’
/usr/include/boost/graph/breadth_first_search.hpp:46:7: error: ‘struct boost::predecessor_recorder<long unsigned int*, boost::on_tree_edge>’ has no member named ‘black_target’
/usr/include/boost/graph/breadth_first_search.hpp:47:7: error: ‘struct boost::predecessor_recorder<long unsigned int*, boost::on_tree_edge>’ has no member named ‘finish_vertex’
make: *** [file] Error 1