[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [igraph] bipartite rewiring in igraph
From: |
Tamás Nepusz |
Subject: |
Re: [igraph] bipartite rewiring in igraph |
Date: |
Tue, 17 Jan 2012 10:05:15 +0100 |
> Is there any way of making a bipartite rewiring in igraph? Let's say
> choosing a random source in nodeset A and a random sink in nodeset B?
> rewire() is all that I found.
There is no built-in function for that; you'll have to code this yourself.
One trick that you might want to employ is that you shouldn't work on the graph
itself but on its adjacency list. So, do the rewiring steps in the adjacency
list, and then construct another graph from this adjacency list. This is
because adding/removing edges is not particularly fast in igraph -- this was a
deliberate choice that we made in the beginning to make query operations
faster. The implementation of rewire() uses the same trick with the adjacency
list behind the scenes.
Cheers,
Tamas