igraph-help
[Top][All Lists]
Advanced

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

Re: [igraph] Intersect graphs with different vertices


From: Magnus Thor Torfason
Subject: Re: [igraph] Intersect graphs with different vertices
Date: Fri, 03 Sep 2010 14:51:01 -0400
User-agent: Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US; rv:1.9.2.8) Gecko/20100802 Thunderbird/3.1.2

Hi Pete,

I'm glad that the code worked out for you, and sorry that I didn't respond earlier.

Anyway, to answer your question about adapting the code for directed graphs: No, there is no reason why this should not work with directed graphs. I simply had not tested them with directed graphs, and the check was only a matter of defensive programming. When the choice is between an error and a potentially unexpected result I tend to opt for an error (especially when the code can then be updated and tested with a given special case in mind).

I have actually now made these and a few other igraph utility functions available on my web page:

http://www.torfason.net/source-code/

If you are using the functions more or less as-is, it would probably be most useful to download them from there, since any updates or bug fixes would be reflected there.

And on that note, you mentioned that you added some attribute copying code. I'd very much like to incorporate any improvements into my code, if you're willing to share.

Best,
Magnus Thor

On 8/26/2010 1:39 PM, Peter Pirolli wrote:
Hi:

I came across your code in

http://lists.nongnu.org/archive/html/igraph-help/2009-10/msg00087.html

which looks to be exactly what I need (thank you)--except that I am working 
with directed graphs. When I modified the relevant lines to permit directed 
graphs and do the appropriate attribute copying, everything seems to work fine 
for the simple examples that I tried. Can you tell me why you originally 
restricted the functions to undirected graphs?

--Pete




reply via email to

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