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 0f74aa7 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 0f74aa7:
#> [1] 3-- 9 6--10 6-- 7 1-- 3 1-- 5 4-- 7 8-- 9 2-- 4 2-- 8 5--10