
On Wed, 13 Mar 2013, bminano wrote:
Hello,
I want to create an iterator_property_map to iterate over the edges, but I cannot declare the following: typedef property_map
::const_type EdgeIndexMap; The compilation gives me an error. I am using an adjacency list with vertex and edge properties. I can use a vertex_index_t, so I assumed that I could use the equivalent for edges. But I don't understand why I can't.
This is my adjacency list: typedef boost::adjacency_list
, bidirectionalS, property , EdgeProperties> Graph; Have anyone deal with something similar?
None of the adjacency_list graph types provides edge_index_t as a built-in property map as far as I know. If you need that map, you will need to define it as an internal property and fill it in yourself (and update it if/when your graph changes). If you just need to use it for property maps, internal properties are much easier. If you are not mutating your graph's structure, the compressed_sparse_row_graph type provides an edge_index_t property automatically as well. -- Jeremiah Willcock