is.mutual               package:igraph               R Documentation

_F_i_n_d _m_u_t_u_a_l _e_d_g_e_s _i_n _a _d_i_r_e_c_t_e_d _g_r_a_p_h

_D_e_s_c_r_i_p_t_i_o_n:

     This function checks the reciproc pair of the supplied edges.

_U_s_a_g_e:

     is.mutual(graph, es = E(graph))

_A_r_g_u_m_e_n_t_s:

   graph: The input graph.

      es: Edge sequence, the edges that will be probed. By default is
          includes all edges in the order of their ids.

_D_e_t_a_i_l_s:

     In a directed graph an (A,B) edge is mutual if the graph also
     includes a (B,A) directed edge.

     Note that multi-graphs are not handled properly, i.e. if the graph
     contains two copies of (A,B) and one copy of (B,A), then these
     three edges are considered to be mutual.

     Undirected graphs contain only mutual edges by definition.

_V_a_l_u_e:

     A logical vector of the same length as the number of edges
     supplied.

_A_u_t_h_o_r(_s):

     Gabor Csardi csardi@rmki.kfki.hu

_S_e_e _A_l_s_o:

     'reciprocity', 'dyad.census' if you just want some statistics
     about mutual edges.

_E_x_a_m_p_l_e_s:

     g <- erdos.renyi.game(10,50,type="gnm",directed=TRUE)
     reciprocity(g)
     dyad.census(g)
     is.mutual(g)
     sum(is.mutual(g))/2 == dyad.census(g)$mut

