[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [igraph] Rewiring Without Altering the Number of Components
From: |
Tamas Nepusz |
Subject: |
Re: [igraph] Rewiring Without Altering the Number of Components |
Date: |
Thu, 13 Nov 2014 12:40:38 +0100 |
User-agent: |
Mutt/1.5.23 (2014-03-12) |
> Is this doable with the igraph (in particular, I use the R bindings)?
Only if you reimplement rewire() from scratch in R and then check the
connectivity of the graph after each rewiring step. One possible speedup is
that if you know that the graph was connected at a particular step and you
rewired (a,b) and (c,d) to (a,d) and (c,b), it is enough to check whether there
is a path between a and b after the rewiring, there is no need to run
is.connected()
(which would check all pairs). Of course this applies to undirected graphs
only. But chances are that this would be quite slow compared to the
C implementation of rewire().
--
T.