boundary                package:graph                R Documentation

_R_e_t_u_r_n_s _t_h_e _B_o_u_n_d_a_r_y _b_e_t_w_e_e_n _a _G_r_a_p_h _a_n_d _a _S_u_b_G_r_a_p_h

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

     The boundary of a subgraph is the set of nodes in the original
     graph that have edges to nodes in the subgraph. The function
     'boundary' computes the boundary and returns it as a list whose
     length is the same length as the number of nodes in the subgraph.

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

     boundary(subgraph, graph)

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

   graph: the original graph from which the boundary will  be created 

subgraph: can either be the vector of the node labels or the subgraph
          itself.

_D_e_t_a_i_l_s:

     The _boundary_ of a _subgraph_ is the set of nodes in the graph
     which have an edge that connects them to the specified subgraph
     but which are themselves not elements of the subgraph.

     For convenience users can specify the subgraph as either a graph
     or a vector of node labels.

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

     This function returns a named list of length equal to the number
     of nodes in 'subgraph'. The elements of the list correspond to the
     nodes in the 'subgraph'. The elements are lists of the nodes in
     'graph' which share an edge with the respective node in
     'subgraph'.

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

     Elizabeth Whalen and R. Gentleman

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

     'subGraph', 'graph-class'

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

       set.seed(123)
       g1 <- randomGraph(letters[1:10], 1:4, p=.3)
       ##both should be "a"
       boundary(c("g", "i"), g1)

