components              package:igraph              R Documentation

_I_n- _o_r _o_u_t- _c_o_m_p_o_n_e_n_t _o_f _a _v_e_r_t_e_x

_D_e_s_c_r_i_p_t_i_o_n:

     Finds all vertices reachable from a given vertex, or the opposite:
     all vertices from which a given vertex is reachable via a directed
     path.

_U_s_a_g_e:

     subcomponent(graph, v, mode = c("all", "out", "in"))

_A_r_g_u_m_e_n_t_s:

   graph: The graph to analyze.

       v: The vertex to start the search from.

    mode: Character string, either "in", "out" or "all". If "in" all
          vertices from which 'v' is reachable are listed. If "out" all
          vertices reachable from 'v' are returned. If "all" returns
          the union of these. It is ignored for undirected graphs.

_D_e_t_a_i_l_s:

     A breadh-first search is conducted starting from vertex 'v'.

_V_a_l_u_e:

     Numeric vector, the ids of the vertices in the same component as
     'v'.

_A_u_t_h_o_r(_s):

     Gabor Csardi csardi@rmki.kfki.hu

_S_e_e _A_l_s_o:

     'clusters'

_E_x_a_m_p_l_e_s:

     g <- erdos.renyi.game(100, 1/200)
     subcomponent(g, 1, "in")
     subcomponent(g, 1, "out")
     subcomponent(g, 1, "all")

