Hello!
It might be an unnecessary question, but I can not find it in the documentation. How the function Graph.rewire() works? Does it take any argument? I found just this Graph analysis, and it is not very explanatory.
Thank you,
Kateřina
Hello!
It might be an unnecessary question, but I can not find it in the documentation. How the function Graph.rewire() works? Does it take any argument? I found just this Graph analysis, and it is not very explanatory.
Thank you,
Kateřina
For an explanation, see Edge-switching Markov chain Monte Carlo (MCMC) methods and the associated figure in this paper:
https://iopscience.iop.org/article/10.1088/2632-072X/abced5
As for “does it take an argument?”, see the documentation:
https://igraph.org/python/api/latest/igraph._igraph.GraphBase.html#rewire
Thank you! I have one more question. Am I right that the rewire function does not keep weights? Or is it somehow possible?
That is correct: weights are discarded.
It is not a trivial question whether there is a reasonable and useful way to retain weights during such a rewiring. If you can formulate such a way, or are aware of a paper discussing one, feel free to open a feature request. This would likely be a new and separate function though.