closeness               package:igraph               R Documentation

_C_l_o_s_e_n_e_s_s _c_e_n_t_r_a_l_i_t_y _o_f _v_e_r_t_i_c_e_s

_D_e_s_c_r_i_p_t_i_o_n:

     Cloness centrality measures how many steps is required to access
     every other vertex from a given vertex.

_U_s_a_g_e:

     closeness(graph, v=V(graph), mode = c("all", "out", "in"))
     closeness.estimate(graph, vids=V(graph), mode = c("out", "in", "all",
            "total"), cutoff) 

_A_r_g_u_m_e_n_t_s:

   graph: The graph to analyze.

  v,vids: The vertices for which closeness will be calculated.

    mode: Character string, defined the types of the paths used for
          measuring the distance in directed graphs. "in" measures the
          paths _to_ a vertex, "out" measures paths _from_ a vertex,
          _all_ uses undirected paths. This argument is ignored for
          undirected graphs.

  cutoff: The maximum path length to consider when calculating the
          betweenness. If zero or negative then there is no such limit.

_D_e_t_a_i_l_s:

     The closeness centrality of a vertex is defined by the inverse of
     the average length of the shortest paths to/from all the other
     vertices in the graph:


                     (|V|-1)/sum( d(v,i), i != v)


     If there is no (directed) path between vertex 'v' and 'i' then the
     total number of vertices is used in the formula instead of the
     path length.

     'closeness.estimate' only considers paths of length 'cutoff' or
     smaller, this can be run for larger graphs, as the running time is
     not quadratic (if 'cutoff' is small). If 'cutoff' is zero or
     negative then the function calculates the exact closeness scores.

_V_a_l_u_e:

     Numeric vector with the closeness values of all the vertices in
     'v'.

_A_u_t_h_o_r(_s):

     Gabor Csardi csardi@rmki.kfki.hu

_R_e_f_e_r_e_n_c_e_s:

     Freeman, L.C. (1979). Centrality in Social Networks I: Conceptual
     Clarification. _Social Networks_, 1, 215-239.

_S_e_e _A_l_s_o:

     'betweenness', 'degree'

_E_x_a_m_p_l_e_s:

     g <- graph.ring(10)
     g2 <- graph.star(10)
     closeness(g)
     closeness(g2, mode="in")
     closeness(g2, mode="out")
     closeness(g2, mode="all")

