隣接リストで表されるグラフがあります。これには depth_first_visit アルゴリズムを適用します。すべてがほぼ正常に動作します。問題は、アルゴリズムが開始点の頂点に接続されている頂点のみを訪問することです。個別の頂点 (接続なし) がある場合、それらはトラバースされません。もちろん、訪問されていない頂点を見つけて、それらからアルゴリズムを開始することでこの問題を解決しましたが、ドキュメントでは、これらの「分離された」頂点もトラバースする必要があると書かれています。質問 - 何か間違ったことをしていますか?
typedef boost::adjacency_list<boost::vecS, boost::vecS, boost::directedS, Vertex, Edge > GraphType;
vector<default_color_type> color_map(num_vertices(m_graph));
depth_first_visit(
m_graph,
*vp.first,
custom_dfs_visitor(m_currentPath, visited),
make_iterator_property_map(
color_map.begin(),
get(vertex_index, m_graph),
color_map[0]),
Terminator(m_currentPath)
);