Re: [Boost-users] [BGL] Problem with color maps for undirected_dfs_visit

Hi Tarjei, On Friday, November 14, 2003, at 05:33 AM, Tarjei Knapstad wrote:
Yes, your edge color map is initialized just fine, but you also need to initialize the edge index map. Here's the reason why: your edge color map uses the edge index map to go from an edge descriptor to an integer offset, which is then used to access into the color vector. Currently, your edge index map is initialized to random garbage, so you are going out-of-bounds when accessing the edge color vector. See the example file exterior_properties.cpp, BTW, you don't need to declare an edge_color property for the adjacency_list because you are using an external edge color map.
Yes, you need it for the reason given above. BTW, if you switch to using an internal edge color property, then you won't need the edge index property, or the edge color vector. Cheers, Jeremy
participants (2)
-
Jeremy Siek
-
Tarjei Knapstad