I have a problem with "rewire" function in igraph.
I randomise my graphs using keeping_degseq but the randomised graphs became very "broken". Especially if I followed niter = vcount(g) * 10. The graphs can be broken into ~1000 disconnected subnetworks.
May I know if there is a way to randomise graphs without breaking? What is best "niter" for "keeping_degseq" to keep the graph intact/connected?
Obviously when "niter" = a small number it will not break so much but it will mean under randomised?
main = read.table("main.txt")
g = graph_from_data_frame(main, directed=FALSE)
no.clusters(g)
[1] 1
g_r = rewire(g, with=keeping_degseq(niter = vcount(g)*10))
no.clusters(g_r)
[1] 1305
I expect to generate an intact rewired graph from my own graph using "rewire" but it is broken into a lot of disconnected subnetworks.