How to manage Graph Property ?

Hi everyone, I really need help to figure out the following problem. -------------------------------------------------------------------------------- First, I create a Vertex Property: typedef property < vertex_index_t, int> VertexProperties; Then, I create an adjacency graph type: typedef adjacency_list < vecS, vecS, directedS, VertexProperties > Graph; Now I can call: VertexProperties V1; --------------------------------------------------------------------------------- My question is: Is there anyway that I can access *VertexProperties *through * Graph* to create the same variable *V1* ?. Thanks, in advance, for your time. I appreciate all suggestions, Tri Nguyen.

On Thu, 15 Apr 2010, nguyen vu tri wrote:
Hi everyone, I really need help to figure out the following problem. -------------------------------------------------------------------------------- First, I create a Vertex Property: typedef property < vertex_index_t, int> VertexProperties;
Then, I create an adjacency graph type: typedef adjacency_list < vecS, vecS, directedS, VertexProperties > Graph;
Now I can call: VertexProperties V1;
--------------------------------------------------------------------------------- My question is: Is there anyway that I can access *VertexProperties *through * Graph* to create the same variable *V1* ?.
What would you need that for? boost::property doesn't have any members -- it's just a tag saying which properties to generate. Did you want the vertex_index property map instead? In that case, do: property_map<Graph, vertex_index_t> pm(get(vertex_index, g)); -- Jeremiah Willcock

What would you need that for? boost::property doesn't have any members --
it's just a tag saying which properties to generate. Did you want the vertex_index property map instead? In that case, do:
property_map<Graph, vertex_index_t> pm(get(vertex_index, g));
-- Jeremiah Willcock
Dear Jeremiah, What I am trying to do is to test if the Vertex Properties of two graphs are the same or not. Also, I intend to use is_same<Vertex_Property_1, Vertex_Property_2> for doing that.
property_map<Graph, vertex_index_t> pm(get(vertex_index, g));
Well, I think using Property Tag is a great way. However, since coders can install their own tags, I do not know how to test all these tags.
What would you need that for?
I would need it for the GSoC Graph Connectives which I have applied to. In my opinion, to proceed the Graph Connectives, two initial graphs must share both the Vertex and Edge Properties. Would you mind having a look at my Proposal Abstract? http://socghop.appspot.com/document/show/user/nvutri/gsoc_abstract I hope this will implement more clearly what I am trying to do. I really appreciate your help, Regards, Tri Nguyen.

On Thu, 15 Apr 2010, nguyen vu tri wrote:
What would you need that for? boost::property doesn't have any members --
it's just a tag saying which properties to generate. Did you want the vertex_index property map instead? In that case, do:
property_map<Graph, vertex_index_t> pm(get(vertex_index, g));
-- Jeremiah Willcock
Dear Jeremiah,
What I am trying to do is to test if the Vertex Properties of two graphs are the same or not. Also, I intend to use is_same<Vertex_Property_1, Vertex_Property_2> for doing that.
You would then need to walk the vertex and edge properties of the two graphs; note that bundled properties can't be enumerated in this way and that the properties may be in different orders for different graphs. I don't think there is a portable way to get the information you want, though. You might need the user to specify how they want each property handled; for example, a property that only exists in one graph might be filled in with a default value when the other graph is put into the output. -- Jeremiah Willcock

You would then need to walk the vertex and edge properties of the two graphs
Dear Jeremiah, Please explain more clearly for me the sentence: "walk the vertex ... properties of the two graphs." Did you mean that I have to walk through all the Property Tags including: vertex_index_t, vertex_name_t, vertex_distance_t, and vertex_color_t , to name but a few ? Thanks for your help, Best, Tri Nguyen.

On Sun, 18 Apr 2010, Tri Nguyen wrote:
You would then need to walk the vertex and edge properties of the two graphs
Dear Jeremiah,
Please explain more clearly for me the sentence: "walk the vertex ... properties of the two graphs." Did you mean that I have to walk through all the Property Tags including: vertex_index_t, vertex_name_t, vertex_distance_t, and vertex_color_t , to name but a few ?
Yes, exactly. You'll need to iterate through each property in the list. Boost.Fusion and/or Boost.MPL might be useful for that, as well as correlating the properties between the two input graphs. -- Jeremiah Willcock
participants (3)
-
Jeremiah Willcock
-
nguyen vu tri
-
Tri Nguyen