
Hi Anton, On 8/2/07, Anton A. Patrushev <anton@orkney.co.jp> wrote:
Hi, How to initialize edge index map? I tried following:
typedef adjacency_list<vecS, vecS, directedS, Vertex, Edge> graph_t;
You are using bundled properties, [snip]
for(tie(ei, ei_end) = edges(graph); ei != ei_end; ++ei, ++index) put(edge_index, graph, *ei, index);
but you are trying to access a property list. If you are using bundled properties and your Edge looks like: struct Edge{ std::size_t edge_index; }; the initialization reads: for(tie(ei, ei_end) = edges(graph); ei != ei_end; ++ei, ++index) graph[*ei].edge_index = index; If you were using property lists and typedef you adjacency_list like typedef adjacency_list<vecS, vecS, directedS, Vertex, property<edge_intex_t, std::size_t> > graph_t; your initialization would worked. See http://tinyurl.com/r7gv6 and http://tinyurl.com/35adta for details. HTH, Stephan