Boost logo

Boost Users :

From: Vladimir Prus (ghost_at_[hidden])
Date: 2003-11-28 06:04:52

Ali Tofigh wrote:

> Is there any guarantee that Vertex descriptors are some kind of integers?

I don't think it's written anywhere, however if this is ever to change, I'm
sure a lot of users will be upset, so it's not likely to change ;-)

> In the examples provided add_edge is called with integers as vertex
> descriptors. Does the choice of parameters for the adjacency_list graph
> make a difference on this issue? E.g. whether the we choose vecS or listS
> as VertexList?

Yes. vertex_descriptor is integer only for vecS.
> If future flexibility of the program being written is a factor (e.g. if we
> want it to be easy to change the definition of the graphs without
> necessarily changing other parts of the code) is it better to use
> add_vertex, followed by add_edge using the vertex descriptors returned by
> add_vertex?

Yes. It always better to use vertex_descriptor for any real code which is
going to be used for arbitrary kind of graph.

- Volodya

Boost-users list run by williamkempf at, kalb at, bjorn.karlsson at, gregod at, wekempf at