
On 11/18/05, Alexander Ivanov <amivanov@gmail.com> wrote:
Hello,
I'm experiencing the same behavior with following graph:
typedef boost::adjacency_list<setS, setS, directedS, ...> graph_t; and then boost::depth_first_search would not take following visitor:
template<GraphT> struct cycle_detector { // ... template <typename EdgeT, typename GraphT> void back_edge(EdgeT E, GraphT& G) { /*...*/} };
replacing VertexList param with vecS fixes the compilation error. Could anyone confirm that is a known issue or otherwise what we're doing wrong?
--Alex
<snip> This isn't a bug - if you use the default color map in depth_first_search, you must also supply a vertex index map (property map that maps vertices into the range 0..num_vertices(g) - 1.) If you use a std::vector for your vertex list, the vertex index map is supplied for you. Otherwise, you'll have to create your own. See the BGL FAQ, #5 (http://tinyurl.com/9skck) for more on how to do this. Aaron