findPath                 package:ggm                 R Documentation

_F_i_n_d_i_n_g _p_a_t_h_s

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

     Finds one path between two nodes of a graph.

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

     findPath(amat, st, en, path = c())

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

    amat: a square Boolean matrix with dimnames, the adjacency matrix
          of a graph.

      st: an integer, the starting node.

      en: an integer, the ending node.

    path: a vector of integers, used in recursive calls. At the
          beginning is 'NULL'. It should not be modified by the user.

_V_a_l_u_e:

     a vector of integers, the sequence of nodes of a path, starting
     from 'st' to 'en'. In some graphs (spanning trees) there is only
     one path between two nodes.

_N_o_t_e:

     This function is not intended to be directly called by the user.

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

     Giovanni M. Marchetti, translating the original 'Python' code (see
     references).

_R_e_f_e_r_e_n_c_e_s:

     Python Softftware Foundation (2003). Python Patterns -
     Implementing Graphs. <URL:
     http://www.python.org/docs/essays/graphs.html>.

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

     'fundCycles'

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

     ## A (single) path on a spanning tree
     findPath(bfs(UG(~ a*b*c + b*d + d*e+ e*c))$tree, st=1, en=5)

