[Top][All Lists]

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

Re: [igraph] igraph union methods

From: Gábor Csárdi
Subject: Re: [igraph] igraph union methods
Date: Fri, 10 Oct 2008 18:40:30 +0200

You did not tell us whether you're using R, Python or C. The set
methods are unfortunately not very good at using attributes, a
workaround solution would be to create edge lists from the graphs,
merge the edge lists and then create a new igraph.

In R, get.edgelist() can return a symbolic edgelist based on the
'name' attribute, then you can use rbind() and unique() to merge the
symbolic edge lists and finally create a new graph with
graph.edgelist(). You have to handle vertex and edge attributes
manually if you need to keep them.


On Fri, Oct 10, 2008 at 5:18 PM,  <address@hidden> wrote:
> Hi,
> I was wondering what was the best technique to merge multiple graphs.
> The union methods appears to merge the nodes based on node id. If I
> wanted to merge the graphs based on a label in the node, whats the best
> approach? I was thinking of adding both graphs, iterating through all
> the vertices and removing duplicate labels and adding new edge that
> belong to the ones that got removed. Is this a sensible approach?
> Thanks,
> Venura
> British Telecommunications plc
> Registered office: 81 Newgate Street London EC1A 7AJ
> Registered in England no. 1800000
> This electronic message contains information from British
> Telecommunications plc which may be privileged or confidential. The
> information is intended to be for the use of the individual(s) or entity
> named above. If you are not the intended recipient be aware that any
> disclosure, copying, distribution or use of the contents of this
> information is prohibited. If you have received this electronic message
> in error, please notify us by telephone or email (to the numbers or
> address above) immediately.
> Activity and use of the British Telecommunications plc email system is
> monitored to secure its effective operation and for other lawful
> business purposes. Communications using this system will also be
> monitored and may be recorded to secure effective operation and for
> other lawful business purposes.
> _______________________________________________
> igraph-help mailing list
> address@hidden
> http://lists.nongnu.org/mailman/listinfo/igraph-help

Gabor Csardi <address@hidden>     UNIL DGM

reply via email to

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