Boost logo

Boost :

From: Andrew Sutton (asutton_at_[hidden])
Date: 2008-02-27 20:24:19

> as it seems I've found a bug in the depth_first_search algorithm.
> I want to use it with my own ColorMap and a start vertex. Here
> is the code taken from
> with
> some slight modifications:

It's a problem with the way you're calling the function. You're

> depth_first_search(g, visitor(vis), &color[0], root );

And getting...

> /usr/include/boost/graph/depth_first_search.hpp:197: error: 'struct
> boost::bgl_named_params<dfs_time_visitor<main::size_type*>,
> boost::graph_visitor_t, boost::no_property>' has no member named
> 'initialize_vertex'
> instantiated from here

It looks like you're calling a function that takes a visitor type as
the 2nd parameter. The problem is that the visitor() function is
probably creating a bgl_named_parameters struct, not a visitor.
Needless to say, the named parameters structure doesn't have members
named initialize_vertex() or finish_vertex(), etc. Try chaining the
named parameters together like this:


> So, there seem to be a bug in the algorithm. When calling it as
> defined in the exampl file from the Boost side without a ColorMap
> and a vertex, it works fine.

Again, it's not really a bug in the algorithm... There's so much
genericism in the interface that it's easy to get lost in the
instantiations. This library is due for a serious overhaul.

Andrew Sutton

Boost list run by bdawes at, gregod at, cpdaniel at, john at