
22 Mar
2013
22 Mar
'13
1:09 p.m.
On 23 March 2013 02:54, Jeremiah Willcock <jewillco@osl.iu.edu> wrote:
On Sat, 23 Mar 2013, Nicholas Mario Wardhana wrote:
put(get(edge_bundle,g), 0, e); // error here
"0" is not a valid edge descriptor. If you want to store the property on the edge you added earlier, you'll need to keep its edge descriptor (returned from add_edge) and use that as the second argument to put().
-- Jeremiah Willcock
Ah, I didn't realise it. So I changed the code to: std::pair<Graph::edge_descriptor, bool> ed = add_edge(0, 1, g); put(get(edge_bundle,g), ed.first, e); and that solves the problem. Thank you Jeremiah! Best regards, Nicholas Mario Wardhana