igraph-help
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [igraph] Union of two graphs keeping attributes


From: Matteo Fortini
Subject: Re: [igraph] Union of two graphs keeping attributes
Date: Thu, 06 Jun 2013 11:42:18 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130509 Thunderbird/17.0.6

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?





reply via email to

[Prev in Thread] Current Thread [Next in Thread]