
On Mon, 3 Oct 2011, gongyiling wrote:
The breadth_first_search algorithm requires a property map for vertex indexes; that is supplied automatically when you use vecS as the vertex container but is not when you use listS. If you truly need listS, you will need to create a new vertex property named vertex_index (boost::vertex_index_t in graph declarations) and fill it in before you call the algorithm. You can fill it using a simple loop over the vertices, assigning consecutive numbers to them.
-- Jeremiah Willcock
Yes, that is it! Thank you, Jeremiah. By the way, is there any documents about this? _______________________________________________
The requirement is in the documentation on breadth_first_search, but it may not be obvious from there how to connect that to setting up a graph type. -- Jeremiah Willcock