Subject: Re: [boost] [graph] dfs depending on VertexList container
From: Jeremiah Willcock (jewillco_at_[hidden])
Date: 2010-09-08 14:35:19
On Wed, 8 Sep 2010, fabien.castan_at_[hidden] wrote:
> We can't use the easiest syntax of dfs, if we use another container than vecS as VertexList container.
> boost::depth_first_search( graph,
> boost::visitor( vis )
> So the only way is to initialize the colormap ourself and give it to the depth_first_search function.
> The problem is that the dfs use operator.
> I looked at the code and if I understand correctly, it seems that this operator is only use to init the colormap.
Does DFS itself use operator? I do not see that in the code. If your
graph has a vertex_index_map property map (filled in appropriately), the
algorithm should create the color map automatically from that. You can
also just create your own color map and have it as a named argument to
depth_first_search (that is simpler syntax than needing to write out all
of the positional arguments).
-- Jeremiah Willcock
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk