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: index of starting node in nodes vector of the graph from
          which 'pens' was derived

       f: index of ending node in nodes vector 

    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)

