incremental.components         package:RBGL         R Documentation

_C_o_m_p_u_t_e _c_o_n_n_e_c_t_e_d _c_o_m_p_o_n_e_n_t_s _f_o_r _a_n _u_n_d_i_r_e_c_t_e_d _g_r_a_p_h

_D_e_s_c_r_i_p_t_i_o_n:

     Compute connected components for an undirected graph

_U_s_a_g_e:

     init.incremental.components(g)
     incremental.components(g)
     same.component(g, node1, node2)

_A_r_g_u_m_e_n_t_s:

       g: an instance of the 'graph' class 

   node1: one vertex of the given graph 

   node2: another vertex of the given graph 

_D_e_t_a_i_l_s:

     This is a family of functions that work together to calculate the
     connected  components of an undirected graph. The algorithm used
     here is based on the  disjoint-sets (fast union-find) data
     structure which is a good method to use for situations where the
     graph is growing (edges are being added) and the connected 
     components information needs to be updated repeatedly. This method
     does not  cover the situation where edges are both added and
     removed from the graph,  hence it is called incremental (and not
     fully dynamic).  Currently, the codes can only handle ONE
     incremental graph at a time.  When you start working on another
     graph by calling "init.incremental.components", the disjoint-sets
     info on the previous graph is lost.

_V_a_l_u_e:

        : 

        : 

     {connected components in the current graph }

_A_u_t_h_o_r(_s):

     Li Long <li.long@isb-sib.ch>

_R_e_f_e_r_e_n_c_e_s:

     Boost Graph Library by Siek et al.

_S_e_e _A_l_s_o:

_E_x_a_m_p_l_e_s:

     coex <- fromGXL(file(system.file("XML/conn2.gxl",package="RBGL")))
     init.incremental.components(coex)
     incremental.components(coex)
     v1 <- 1
     v2 <- 5
     same.component(coex, v1, v2)

