|
Boost : |
From: Mohamed Anouar Rachdi (marachdi_at_[hidden])
Date: 2006-10-05 14:33:49
#########################################################################
typename graph_traits<Graph>::edge_descriptor ed;
bool exist;
typename graph_traits<Graph>::edge_iterator ei, ei_end;
Graph copyGraph;
typename boost::property_map<Graph, edge_weight_t>::type weight =
get(edge_weight, graph);
typename boost::property_map<Graph, edge_index_t>::type edge_id =
get(edge_index, graph);
typename boost::property_map<Graph, edge_weight_t>::type weightc =
get(edge_weight, copyGraph);
typename boost::property_map<Graph, edge_index_t>::type edge_idc =
get(edge_index, copyGraph);
for ( tie(ei, ei_end)=edges(graph); ei != ei_end; ei++ )
{
tie(ed, exist)= add_edge( source(*ei,graph), target(*ei,graph),
copyGraph);
put(edge_idc, ed, edge_id[*ei]);
put(weightc, ed, weight[*ei]);
}
##############################################################################
hello everyone,
i have a problem with this code that is used inside a fonction wich a
call in a loop
after 2 or 3 calls i have a segfault at the line with add_edge
i'm using multigraphs
Ps : i got the same probleme whiel using copy_graph(graph,copyGraph)
is there any suggestions.....
thanx
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk