compGdist              package:GOstats              R Documentation

_A _f_u_n_c_t_i_o_n _t_o _c_o_m_p_u_t_e _t_h_e _d_i_s_t_a_n_c_e _b_e_t_w_e_e_n _p_a_i_r_s _o_f _n_o_d_e_s _i_n _a _g_r_a_p_h.

_D_e_s_c_r_i_p_t_i_o_n:

     Given a graph, 'g', and a set of nodes in the graph, 'whNodes',
     Dijkstra's shortest path algorithm is used to compute the distance
     between all pairs of nodes in 'whNodes'.

_U_s_a_g_e:

     compGdist(g, whNodes, verbose = FALSE)

_A_r_g_u_m_e_n_t_s:

       g: An instance of the 'graph' class. 

 whNodes: A vector of lables of the nodes in 'g' for which distances
          are to be computed. 

 verbose: If 'TRUE' then output reporting the progress will be
          reported. 

_D_e_t_a_i_l_s:

     This function can be quite slow, computation of the pairwise
     distances is not especially fast and if 'whNodes' is long then
     there are many of them to compute.

_V_a_l_u_e:

     A matrix containing the pairwise distances. It might be worth
     making this an instance of the 'dist' class at some point.

_A_u_t_h_o_r(_s):

     R. Gentleman

_S_e_e _A_l_s_o:

     'compCorrGraph'

_E_x_a_m_p_l_e_s:

      example(compCorrGraph)
      compGdist(corrG, nodes(corrG)[1:5])

