See the links below for the implemented rewiring methods.
See also
Other rewiring functions:
each_edge()
,
keeping_degseq()
Examples
g <- make_ring(10)
g %>%
rewire(each_edge(p = .1, loops = FALSE)) %>%
plot(layout = layout_in_circle)
print_all(rewire(g, with = keeping_degseq(niter = vcount(g) * 10)))
#> IGRAPH a60e67c U--- 10 10 -- Ring graph
#> + attr: name (g/c), mutual (g/l), circular (g/l)
#> + graph attributes:
#> | + name:
#> | [1] "Ring graph"
#> | + mutual:
#> | [1] FALSE
#> | + circular:
#> | [1] TRUE
#> + edges from a60e67c:
#> [1] 2-- 6 1-- 8 3-- 5 1-- 9 5-- 8 3-- 6 4--10 4-- 7 9--10 2-- 7