Boost logo

Boost Users :

Subject: Re: [Boost-users] [graph] compile breadth_first_search error.
From: Jeremiah Willcock (jewillco_at_[hidden])
Date: 2011-10-03 09:18:09


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


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