
1 Apr
2010
1 Apr
'10
6:55 p.m.
On Apr 1, 2010, at 6:40 AM, Jeremiah Willcock wrote:
Note that you need to fill in the edge indices
Okay, so whenever I add an edge I need to assign it a unique index myself. Here's how I'm doing it for the initial construction of the graph: size_t edgeIndex = 0; for (...) { Vertex u = ... Vertex v = ... Edge edge; bool inserted; tie(edge, inserted) = add_edge(u, v, g); EdgeIndexMap edgeIndexMap = get(edge_index, g); put(edgeIndexMap, edge, edgeIndex++); } Does that look right? It seems to work, but I'm wondering if it's the best way. Trevor