|
Boost Users : |
From: Doug Gregor (dgregor_at_[hidden])
Date: 2005-04-22 17:05:57
On Apr 9, 2005, at 9:14 PM, Qiaofeng Yang wrote:
> Hi,
>
> I have a question about the graph type used in BGL function
> "connected_components()".
>
> When I define the graph type to be:
> adjacency_list<vecS, vecS, undirectedS>
>
> Everything is OK. When I change the graph type to be:
> adjacency_list<listS, listS, undirectedS>
>
> I got a lot of compilation error messages. Anybody knows why is so?
> Was "connected_components()" only implemented on one particular
> implementaton of graphs like vecS?
connected_components can work with either graph, but with the listS
graph you'll need to either (1) supply a vertex_index property map that
goes from vertices to indices or (2) supply a color_map. The example
dijkstra-example-listS.cpp illustrates how to build and use a
vertex_index property map.
Doug
Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net