Error while using bundled property with subgraph
Hello All, I am using bundled property in my subgraph. I have bundled property structure defined for edges. It works fine with the normal graph. But when I try to create the subgraph I am getting this error. *error C2338: (!is_same<edge_index_type, boost::detail::error_property_not_found>::val* ue). This is how my bundled edge property looks like struct Edgep { int edge_index; int edge_w; std::string edge_name; }; This is how my graph is created typedef subgraph< adjacency_list<vecS, vecS, undirectedS, property<vertex_index_t, int>,Edgep > > Graph; Can you please help me to interpret this error. What is causing this error? -- Regards, Giridhar
Hi, On Saturday, 20. November 2010 04:58:56 giridhar wrote:
Hello All,
I am using bundled property in my subgraph. I have bundled property structure defined for edges. It works fine with the normal graph. But when I try to create the subgraph I am getting this error. *error C2338: (!is_same<edge_index_type, boost::detail::error_property_not_found>::val* ue).
This is how my bundled edge property looks like
struct Edgep { int edge_index; int edge_w; std::string edge_name; };
This is how my graph is created typedef subgraph< adjacency_list<vecS, vecS, undirectedS, property<vertex_index_t, int>,Edgep > > Graph;
Can you please help me to interpret this error. What is causing this error?
The error seems to come from the fact that subgraph expects edge_index as an internal property. Defining: typedef subgraph< adjacency_list<vecS, vecS, undirectedS, no_property, property< edge_index_t, unsigned int > > > Graph; Seems to solve that issue. At least, my compiler (gcc-4.3.4) does no longer complain about that line with the above change. The problem I see now is how to integrate bundled properties on top. I don't know if it still are bundled properties if they are used in nested internal properties. Therefore, a more general question might be to ask: Does the subgraph-concept readily work with bundled properties? A quick look at the code does suggest so but I am not completely sure... Best, Cedric
Hi, sorry to post separate mails, but I just tested it and the subgraph-concept also works with bundled properties very conveniently: typedef subgraph< adjacency_list<vecS, vecS, undirectedS, no_property, property< edge_index_t, unsigned int, Edgep > > > Graph; where: struct Edgep { int edge_index; int edge_w; std::string edge_name; }; Thumbs up to those working on the BGL and boost in general! :) I wonder though why the subgraph-concept expects the edge_index as an internal property but does not seem to take care to automatically add one. At least this would seem logical to me. So please correct me on this if I am wrong. Best, Cedric On Saturday, 20. November 2010 04:58:56 giridhar wrote:
Hello All,
I am using bundled property in my subgraph. I have bundled property structure defined for edges. It works fine with the normal graph. But when I try to create the subgraph I am getting this error. *error C2338: (!is_same<edge_index_type, boost::detail::error_property_not_found>::val* ue).
This is how my bundled edge property looks like
struct Edgep { int edge_index; int edge_w; std::string edge_name; };
This is how my graph is created typedef subgraph< adjacency_list<vecS, vecS, undirectedS, property<vertex_index_t, int>,Edgep > > Graph;
Can you please help me to interpret this error. What is causing this error?
participants (2)
-
Cedric Laczny
-
giridhar