Boost logo

Boost :

From: Douglas Gregor (doug.gregor_at_[hidden])
Date: 2007-04-27 11:04:31


On Apr 26, 2007, at 9:27 PM, Stephen Torri wrote:
> Ok. Now that explains why my fix works. I tried to make the
> vertex_index
> contain the unique ID that I assigned to each Component. Well that is
> fine but that information is also contained in the Component. So I
> switched my graph to have the following definition:
>
> typedef boost::property< boost::vertex_name_t,
> Component::ptr_t > VertexProperty_t;
>
> typedef boost::adjacency_list<boost::vecS, // OutEdgeList
> boost::vecS, // VertexList
> boost::directedS, // Directed
> VertexProperty_t> //
> VertexProperties
> Graph_t;
>
> Will each vertex_index will get a value assigned to it?

Yes, it will. When the VertexListS template parameter is given vecS,
the vertex_index is identical to the vertex's position in the vector
of vertices.

        - Doug


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