rewire                package:igraph                R Documentation

_G_r_a_p_h _r_e_w_i_r_i_n_g

_D_e_s_c_r_i_p_t_i_o_n:

     Randomly rewires a graph while preserving the degree distribution.

_U_s_a_g_e:

     rewire(graph, mode = "simple", niter = 100) 

_A_r_g_u_m_e_n_t_s:

   graph: The graph to be rewired.

    mode: The rewiring algorithm to be used. It can be one of the
          following: 'simple': simple rewiring algorithm which chooses
          two arbitrary edges in each step (namely (a,b) and (c,d)) and
          substitutes them with (a,d) and (c,b) if they don't yet
          exist.

   niter: Number of rewiring trials to perform.

_D_e_t_a_i_l_s:

     This function generates a new graph based on the original one by
     randomly rewiring edges while preserving the original graph's
     degree distribution.

_V_a_l_u_e:

     A new graph object.

_A_u_t_h_o_r(_s):

     Tamas Nepusz ntamas@rmki.kfki.hu and Gabor Csardi
     csardi@rmki.kfki.hu

_S_e_e _A_l_s_o:

     'degree.sequence.game'

_E_x_a_m_p_l_e_s:

     g <- graph.ring(20)
     g2 <- rewire(g, niter=3)

