Boost logo

Boost Users :

Subject: Re: [Boost-users] newbie - graph library - vertex properties
From: List User (listuser_at_[hidden])
Date: 2009-12-15 01:41:39

Hi Jeremiah Willcock,

Thanks for the reply. I think the const error was something else...

Let me ask you a couple of questions from bundled properties:

        1. the prototype of get is, get(name_map, vertex_descriptor) right. But in the bundled properties documentation, it is written as get(&Highway::miles, map). How is it?
        2. get(vertex_bundle, map), here what is vertex_bundle?Thanks

From: Jeremiah Willcock <jewillco_at_[hidden]>
To: boost-users_at_[hidden]
Sent: Mon, December 14, 2009 3:04:04 PM
Subject: Re: [Boost-users] newbie - graph library - vertex properties

On Mon, 14 Dec 2009, List User wrote:

> Hi
> 1. In the creation of adjacency list, vertex properties and edge properties could be vecS, listS etc.But how will one access this
> vertex_properties vector, for example?

The vecS, listS, ... tags specify how the vertices and edges of the graph are stored, not anything about properties. You cannot get to the property storage directly except using boost::get and boost::put (and some other ways for bundled properties).

> 2. In the kevin-bacon2.cpp example file available with boost distribution, a struct is used to store vertex properties. But that
> example does not seem to have used boost_install_property or property_map etc. I thought one would need to use them for having
> new properties for the vertex.

That example uses bundled properties ( which remove the need for the operations you named.

> 3. In the kevin-bacon2.cpp approach for adding new properties to the graph, the vertex_properties are read as
> adjacency_list[vertex_descriptior]. How will have a read only access in such a case? When I use this in a function which is
> defined as const in c++, the compiler cribs :)

A function defined as const, or taking the graph as const? What error do you get?

-- Jeremiah Willcock
Boost-users mailing list


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