[Lemon-user] GraphCopy : ??
Mitcsenkov Attila
mitcsenkov at tmit.bme.hu
Tue Dec 4 18:49:22 CET 2007
Hi!
I tried to figure out how to make a duplicate of a (List)Graph object, but
now I give it up... :(
In the documentation I've found the GraphCopy class:
"Class to copy a graph to another graph (duplicate a graph). The simplest
way of using it is through the
<http://lemon.cs.elte.hu/pub/doc/latest/a00842.html#g44340894daf6f7d9908679c
fa989dab1> copyGraph() function."
OK. I've tried both, because the documentation about it was not so verbose.
Now this is the code that should work - if I understand the documentation.
Possibly not, because it doesn't work:
lemon::copyGraph(LG,net.NetworkGraph); // 1
GraphCopy<ListGraph,ListGraph> GC(LG,net.NetworkGraph);
// 2
for(ListGraph::NodeIt nIt(net.NetworkGraph);nIt != INVALID;
++nIt)
cout << "X" << endl;
for(ListGraph::NodeIt nIt(LG);nIt != INVALID; ++nIt)
cout << "Y" << endl;
I've tried lines number 1 and 2 both separately, but none of them was
working: the output in any case was multiple X-s, and no Y-s.
Could you please help me, how to duplicate my graph?
Thanks:
Attila
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lemon.cs.elte.hu/pipermail/lemon-user/attachments/20071204/ab3faaad/attachment.html>
More information about the Lemon-user
mailing list