kCores                 package:RBGL                 R Documentation

_F_i_n_d _a_l_l _t_h_e _k-_c_o_r_e_s _i_n _a _g_r_a_p_h

_D_e_s_c_r_i_p_t_i_o_n:

     Find all the k-cores in a graph

_U_s_a_g_e:

     kCores(g, EdgeType=c("in", "out"))

_A_r_g_u_m_e_n_t_s:

       g: an instance of the 'graph' class 

EdgeType: 

     {what types of edges to be considered when 'g' is directed }

_D_e_t_a_i_l_s:

     A k-core in a graph is a subgraph where each node is adjacent to
     at least a minimum number, k, of the other nodes in the subgraph.

     The implementation is based on the algorithm by V. Batagelj and M.
     Zaversnik, 2002.

     The example 'snacoreex.gxl' is in the paper by V. Batagelj and M.
     Zaversnik, 2002.

_V_a_l_u_e:

     A vector of the core numbers for all the nodes in '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:

     Social Network Analysis: Methods and Applications.  By S.
     Wasserman and K. Faust, pp. 266.  An O(m) Algorithm for Cores
     decomposition of networks, by V. Batagelj and M. Zaversnik, 2002.

_S_e_e _A_l_s_o:

_E_x_a_m_p_l_e_s:

     kcoex <- fromGXL(file(system.file("XML/snacoreex.gxl",package="RBGL")))
     kCores(kcoex)

     kcoex2 <- fromGXL(file(system.file("XML/conn2.gxl",package="RBGL")))
     kCores(kcoex2)
     kCores(kcoex2, "in")
     kCores(kcoex2, "out")

