igraph-help
[Top][All Lists]
Advanced

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

[igraph] variant of graph.union


From: Rajarshi Guha
Subject: [igraph] variant of graph.union
Date: Mon, 3 Aug 2015 16:14:16 -0400

Hi, I have two graphs, and I would like to merge them, but in a way that differs a bit from graph.union.

In my case, if there is a common node (defined as the name attribute being equal) I'd like the two nodes to be added to the final graph and an edge created between them. This way the edges for the common node in g1 are distinct from the edges of that node in g2, in the final graph.

I started by manually adding nodes from one graph to another, but I was wondering if there was a more elegant way to do this.

Thanks,

--
Rajarshi Guha | http://blog.rguha.net
NIH Center for Advancing Translational Science

reply via email to

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