Boost logo

Boost :

From: Vladimir Prus (ghost_at_[hidden])
Date: 2004-10-27 04:47:02


Manas Singh wrote:

> I am having problem with passing a color map to depth_first_visit
> algorithm.
>
> I have defined my graph as follows:
> typedef adjacency_list < vecS, vecS, directedS,
> property<vertex_color_t, default_color_type,
> property<vertex_count_t, int> > > graph_t;
>
>
> I have defined a vector of default_color_type as follows:
>
> std::vector<default_color_type> colors(num_vertices(g));
>
>
> I am calling dfs visit as follows:
>
> depth_first_visit(graph, start_vertex, visitor(vis_count), colors.begin(
> ));

Try &colors[0] and
 
  make_iterator_property_map(&colors[0], get(vertex_index, g))

as the last parameter.

>
> But while compiling I am getting error.

When reporting a problem, please always provide the complete example which
reproduces the problems, the exact error message, compiler version and
Boost version.

- Volodya


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk