permute.vertices           package:igraph           R Documentation

_P_e_r_m_u_t_e _t_h_e _v_e_r_t_i_c_e_s _o_f _a _g_r_a_p_h

_D_e_s_c_r_i_p_t_i_o_n:

     Create a new graph, by permuting vertex ids.

_U_s_a_g_e:

     permute.vertices(graph, permutation)

_A_r_g_u_m_e_n_t_s:

   graph: The input graph, it can directed or undirected.

permutation: A numeric vector giving the permutation to apply. The
          first element is the new id of vertex 0, etc. Every number
          between zero and 'vcount(graph)-1' must appear exactly once.

_D_e_t_a_i_l_s:

     This function creates a new graph from the input graph by
     permuting its vertices according to the specified mapping. Call
     this function with the output of 'canonical.permutation' to create
     the canonical form of a graph.

_V_a_l_u_e:

     A new graph object.

_A_u_t_h_o_r(_s):

     Gabor Csardi csardi@rmki.kfki.hu

_S_e_e _A_l_s_o:

     'canonical.permutation'

_E_x_a_m_p_l_e_s:

     # Random permutation of a random graph
     g <- random.graph.game(20, 50, type="gnm")
     g2 <- permute.vertices(g, sample(vcount(g))-1)
     graph.isomorphic(g, g2)

