My bad. I edited the solution on SO (per their policy) instead of showing the before/after solutions, so the current one is not so bad even in Python (the previous one was much slower).

Is it possible to insert into next igraph? Should I go ahead and send a pull request on github?

How would you call it? An option on Graph.compose()? It's not a real union, it's more the reverse of a decompose() operation.

Thank you,
Matteo

Il 05/06/2013 22:12, Tamás Nepusz ha scritto:
Hi,

regarding a question which was asked before in this ML by Gábor Tóth,
you can find my solution here, which works, but is still too slow for
me:

http://stackoverflow.com/questions/16928593/igraph-python-union-preserving-attributes

Hope someone can find a way to speed it up.
This is probably as good as it gets using pure Python. Have you tried to 
measure which part is the slowest in your case? Is it the addition of edges, or 
the part where the vertex/edge attributes are copied?



_______________________________________________
igraph-help mailing list
[email protected]
https://lists.nongnu.org/mailman/listinfo/igraph-help

Reply via email to