copy a graph (adjacency_list) to another one

13 Feb
2012
13 Feb
'12
3:07 p.m.
How can I copy a graph of type adjacency_list to another one graph of type adjacency_list ? Look at the flowing code example: typedef adjacency_list<setS, setS, undirectedS, NodeDataStruct, EdgeDataStruct> MyGraph; MyGraph g1, g2; // processing g1: adding vertices and edges ... // processing g2: adding some vertices and edges ... g1.clear(); g1 = g2 // this gives an execution error (exception) g1 = MyGraph(g2); // this also gives an execution error g2.clear(); Note that to use of copy_graph(...) it is said that the graph type must be a model of VertexListGraph. In my case it is an adjacency_list ... Thanks,
4881
Age (days ago)
4881
Last active (days ago)
0 comments
1 participants
participants (1)
-
ShNaYkHs ShNaYkHs