rewire.edges             package:igraph             R Documentation

_R_e_w_i_r_e_s _t_h_e _e_n_d_p_o_i_n_t_s _o_f _t_h_e _e_d_g_e_s _o_f _a _g_r_a_p_h _r_a_n_d_o_m_l_y

_D_e_s_c_r_i_p_t_i_o_n:

     This function rewires the endpoints of the edges with a constant
     probability uniformly randomly to a new vertex in a graph.

_U_s_a_g_e:

     rewire.edges(graph, prob)

_A_r_g_u_m_e_n_t_s:

   graph: The input graph

    prob: The rewiring probability, a real number between zero and one.

_D_e_t_a_i_l_s:

     Note that this function might create graphs with multiple and/or
     loop edges.

_V_a_l_u_e:

     A new graph object.

_A_u_t_h_o_r(_s):

     Gabor Csardi csardi@rmki.kfki.hu

_E_x_a_m_p_l_e_s:

     # Some random shortcuts shorten the distances on a lattice
     g <- graph.lattice( length=100, dim=1, nei=5 )
     average.path.length(g)
     g <- rewire.edges( g, prob=0.05 )
     average.path.length(g)

