Boost logo

Boost Users :

From: Tim Rowe (boost_at_[hidden])
Date: 2004-06-26 05:33:52

On Fri, 25 Jun 2004 16:53:51 -0500, Doug Gregor wrote:
> On Friday 25 June 2004 4:52 pm, Tim Rowe wrote:
>> The documentation for add_edge() says that the first two
>> parameters are of type boost::graph_traits<G>::vertex_descriptor.
>> In the example in quick_tour.html it is called with integers
>> (from an enum) as its first two parameters. Is that because:
>> i. add_edge is overloaded to take integers as the first two
>> parameters;
> Not this one; add_edge really does take vertex descriptors, only.
>> ii. boost::graph_traits<G>::vertex_descriptor
>> just happens to be an integer type in this case;
> Exactly. When the type of the vertex list for an adjacency list is
> "vecS", the descriptors are just integers. It tends to make many
> things much easier when this is the case!

Thanks -- is that documented? I couldn't find it. And what about when the type of the vertex list is something else -- is the type of boost::graph_traits<G>::vertex_descriptor available to the user for anything more than declaring variables to identify vertices?

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