[Lemon-user] copy constructor of default maps

Attila Bernáth bernath.athos at gmail.com
Sat Jul 27 18:16:30 CEST 2013


Dear developers,

I wanted to copy some nodemaps, and I realized I have to write functions
like

void bmcpy(const Graph & g,const BoolNodeMap & from, BoolNodeMap & to){
    for (Graph::NodeIt n(g);n!=INVALID;++n){
        to[n]=from[n];
    }
}

I found this ticket about the subject:
http://lemon.cs.elte.hu/trac/lemon/ticket/137

If I see well, this is still the state of the art. Am I right?

Another question regarding functions like the one above: if I only pass the
two nodemaps, then they will not know how to iterate over the nodes, right?

Thanks in advance!

Attila
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lemon.cs.elte.hu/pipermail/lemon-user/attachments/20130727/c39bf4b5/attachment.html>


More information about the Lemon-user mailing list