
Hi Aaron, Thanks for the help! Still trying to understand how to use BGL. As for the original graph type, I was using: typedef adjacency_list< vecS, vecS, undirectedS, property<vertex_index_t, long>, property<edge_index_t, long> > ConnectionGraph; Having had no luck with it, I changed it back to the example using name / string and then it worked. typedef adjacency_list< vecS, vecS, undirectedS, property<vertex_name_t, std::string>, property<edge_name_t, std::string> > ConnectionGraph; So I'm still confused as to why it would be a l-value issue in one case but not in the other. In both of these situations, the goal is trying to populate the property map right? -----Original Message----- From: Aaron Windsor [mailto:aaron.windsor@gmail.com] Sent: Saturday, November 03, 2007 5:54 AM To: boost-users@lists.boost.org Subject: Re: [Boost-users] [BGL] property_map not compiling because it's notl-value? Hi Andrew, Your code didn't show the type of graph you're using for interfaceGraph, but I'm going to assume that it's an adjacency_list using a std::vector to store the vertices. In that case, the vertex index is populated automatically with the indices of each vertex descriptor in the underlying vector, making the vertex index map read-only. In other configurations (for example, using a std::list to store the vertices) you can set the vertex index - in fact, you have to initialize it yourself if you're going to use it. The vertex index and edge index are used by most BGL algorithms to create property maps from vertices and edges to arbitrary types, so I'd recommend against using them for anything else (in your code, you're using them to store a grid id and connecting element id). Check out the documentation on bundled properties, which allow you to augment graphs with arbitrary properties easily (http://www.boost.org/libs/graph/doc/bundles.html). Regards, Aaron _______________________________________________ Boost-users mailing list Boost-users@lists.boost.org http://lists.boost.org/mailman/listinfo.cgi/boost-users