clusteringCoefAppr           package:RBGL           R Documentation

_A_p_p_r_o_x_i_m_a_t_e _c_l_u_s_t_e_r_i_n_g _c_o_e_f_f_i_c_i_e_n_t _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:

     Approximate clustering coefficient for an undirected graph

_U_s_a_g_e:

     clusteringCoefAppr(g, k=length(nodes(g)), Weighted=FALSE, vW=degree(g))

_A_r_g_u_m_e_n_t_s:

       g: an instance of the 'graph' class 

Weighted: calculate weighted clustering coefficient or not

      vW: vertex weights to use when calculating weighted clustering
          coefficient

       k: parameter controls total expected runtime

_D_e_t_a_i_l_s:

     It is quite expensive to compute cluster coefficient and
     transitivity exactly  for a large graph by computing the number of
     triangles in the graph.  Instead,  'clusteringCoefAppr' samples
     triples with appropriate probability, returns the ratio between
     the number of existing edges and the number of samples.   

     MORE ABOUT CHOICE OF K.

     See reference for more details.

_V_a_l_u_e:

     Approximated clustering coefficient for graph 'g'.

_A_u_t_h_o_r(_s):

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

_R_e_f_e_r_e_n_c_e_s:

     Approximating Clustering Coefficient and Transitivity, T. Schank,
     D. Wagner,  Journal of Graph Algorithms and Applications, Vol. 9,
     No. 2 (2005).

_S_e_e _A_l_s_o:

     clusteringCoef, transitivity, graphGenerator

_E_x_a_m_p_l_e_s:

     g <- fromGXL(file(system.file("XML/conn.gxl",package="RBGL")))
     k = length(nodes(g))
     cc <- clusteringCoefAppr(g, k)
     ccw1 <- clusteringCoefAppr(g, k, Weighted=TRUE)
     vW  <- c(1, 1, 1, 1, 1,1, 1, 1)
     ccw2 <- clusteringCoefAppr(g, k, Weighted=TRUE, vW)

