extractPath               package:RBGL               R Documentation

_c_o_n_v_e_r_t _a _d_i_j_k_s_t_r_a._s_p _p_r_e_d_e_c_e_s_s_o_r
_s_t_r_u_c_t_u_r_e _i_n_t_o _t_h_e _p_a_t_h _j_o_i_n_i_n_g _t_w_o _n_o_d_e_s

_D_e_s_c_r_i_p_t_i_o_n:

     determine a path between two nodes in a graph, using output of
     'dijkstra.sp'.

_U_s_a_g_e:

     extractPath(s, f, pens)

_A_r_g_u_m_e_n_t_s:

       s: s: index of starting node in nodes vector of the graph from
          which 'pens' was derived

       f: f: index of ending node in nodes vector 

    pens: pens: predecessor index vector as returned in the 'preds'
          component of 'dijkstra.sp' output

_A_u_t_h_o_r(_s):

     Vince Carey <stvjc@channing.harvard.edu>

_S_e_e _A_l_s_o:

     'allShortestPaths'

_E_x_a_m_p_l_e_s:

     data(FileDep)
     dd <- dijkstra.sp(FileDep)
     extractPath(1,9,dd$pen)

