[Lemon-user] copy constructor of default maps

Alpar Juttner alpar at cs.elte.hu
Tue Jul 30 07:26:15 CEST 2013


On Sat, 2013-07-27 at 18:16 +0200, Attila Bernáth wrote:
> Dear developers,
> 
> 
> I wanted to copy some nodemaps, and I realized I have to write
> functions like

It is already implemented in lemon as the template function
mapCopy(g,m1,m2):

http://lemon.cs.elte.hu/pub/doc/1.2.3/a00523.html#gaee9c2154f32a8d4c060445b3f380c5b7


> 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?

It general, it's right. However, the graph's own maps knows the base
graph, so use can use it if you want to copy these kind of maps only.
You can even use it for checking whether the two maps belong to the same
graph.

Alpar






More information about the Lemon-user mailing list