clusters               package:igraph               R Documentation

_C_o_n_n_e_c_t_e_d _c_o_m_p_o_n_e_n_t_s _o_f _a _g_r_a_p_h

_D_e_s_c_r_i_p_t_i_o_n:

     Calculate the maximal (weakly or strongly)  connected components
     of a graph

_U_s_a_g_e:

     is.connected(graph, mode=c("weak", "strong"))
     clusters(graph, mode=c("weak", "strong"))
     no.clusters(graph, mode=c("weak", "strong"))
     cluster.distribution(graph, cumulative = FALSE, mul.size = FALSE, ...)

_A_r_g_u_m_e_n_t_s:

   graph: The graph to analyze.

    mode: Character string, either "weak" or "strong". For directed
          graphs "weak" implies weakly, "strong" strongly connected
          components to search. It is ignored for undirected graphs.

cumulative: Logical, if TRUE the cumulative distirubution (relative
          frequency) is calculated.

mul.size: Logical. If TRUE the relative frequencies will be multiplied
          by the cluster sizes.

     ...: Additional attributes to pass to 'cluster', right now only
          'mode' makes sense.

_D_e_t_a_i_l_s:

     'is.connected' decides whether the graph is weakly or strongly
     connected.

     'clusters' finds the maximal (weakly or strongly) connected
     components of a graph.

     'no.clusters' does almost the same as 'clusters' but returns only
     the number of clusters found instead of returning the actual
     clusters.

     'cluster.distribution' creates a histogram for the maximal
     connected component sizes.

     Breadth-first search is conducted from each not-yet visited
     vertex.

_V_a_l_u_e:

     For 'is.connected' a logical constant.

     For 'clusters' a named list with three components: 

membership: numeric vector giving the cluster id to which each vertex
          belongs.

   csize: numeric vector giving the sizes of the clusters.

      no: numeric constant, the number of clusters.


     For 'no.clusters' an integer constant is returned.

     For 'cluster.distribution' a numeric vector with the relative
     frequencies. The length of the vector is the size of the largest
     component plus one. Note that (for currently unknown reasons) the
     first element of the vector is the number of clusters of size
     zero, so this is always zero.

_A_u_t_h_o_r(_s):

     Gabor Csardi csardi@rmki.kfki.hu

_S_e_e _A_l_s_o:

     'subcomponent'

_E_x_a_m_p_l_e_s:

     g <- erdos.renyi.game(20, 1/20)
     clusters(g)

