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])

