keeping_degseq

0th

Percentile

Graph rewiring while preserving the degree distribution

This function can be used together with rewire to randomly rewire the edges while preserving the original graph's degree distribution.

Keywords
graphs
Usage
keeping_degseq(loops = FALSE, niter = 100)
Arguments
loops

Whether to allow destroying and creating loop edges.

niter

Number of rewiring trials to perform.

Details

The rewiring algorithm chooses two arbitrary edges in each step ((a,b) and (c,d)) and substitutes them with (a,d) and (c,b), if they not already exists in the graph. The algorithm does not create multiple edges.

See Also

sample_degseq

Other rewiring functions: each_edge; rewire

Aliases
  • keeping_degseq
Examples
# NOT RUN {
g <- make_ring(10)
g %>%
  rewire(keeping_degseq(niter = 20)) %>%
  degree()
str(rewire(g, with = keeping_degseq(niter = vcount(g) * 10)))
# }
Documentation reproduced from package igraph, version 1.0.1, License: GPL (>= 2)

Community examples

Looks like there are no examples yet.