structure.info            package:igraph            R Documentation

_G_a_i_n_i_n_g _i_n_f_o_r_m_a_t_i_o_n _a_b_o_u_t _g_r_a_p_h _s_t_r_u_c_t_u_r_e

_D_e_s_c_r_i_p_t_i_o_n:

     Functions for exploring the basic structure of a network: number
     of vertices and edges, the neighbors of a node, test whether two
     vertices are connected by an edge.

_U_s_a_g_e:

     vcount(graph)
     ecount(graph)
     neighbors(graph, v, mode = 1)
     is.directed(graph)
     are.connected(graph, v1, v2)
     get.edge(graph, id)
     get.edges(graph, es)

_A_r_g_u_m_e_n_t_s:

   graph: The graph.

       v: The vertex of which the neighbors are queried.

    mode: Character string, specifying the type of neighboring vertices
          to list in a directed graph. If "out" the vertices _to_ which
          an edge exist are listed, if "in" the vertices _from_ which
          an edge is directed are listed, "all" lists all the vertices.
          This argument is ignored for undirected graphs.

      v1: The id of the first vertex. For directed graphs only edges
          pointing from 'v1' to 'v2' are searched.

      v2: The id of the second vertex. For directed graphs only edges
          pointing from 'v1' to 'v2' are searched.

      id: A numeric edge id.

      es: An edge sequence.

_D_e_t_a_i_l_s:

     These functions provide the basic structural information of a
     graph.

     'vcount' gives the number of vertices in the graph.

     'ecount' gives the number of edges in the graph.

     'neighbors' gives the neighbors of a vertex. The vertices
     connected by multiple edges are listed as many times as the number
     of connecting edges.

     'is.directed' gives whether the graph is directed or not. It just
     gives its 'directed' attribute.

     'are.connected' decides whether there is an edge from 'v1' to
     'v2'. 

     'get.edge' returns the end points of the edge with the supplied
     edge id. For directed graph the source vertex comes first, for
     undirected graphs, the order is arbitrary.

     'get.edges' returns a matrix with the endpoints of the edges in
     the edge sequence argument.

_V_a_l_u_e:

     'vcount' and 'ecount' return integer constants. 'neighbors'
     returns an integer vector. 'is.directed' and 'are.connected'
     return boolean constants. 'get.edge' returns a numeric vector of
     length two. 'get.edges' returns a two-column matrix.

_A_u_t_h_o_r(_s):

     Gabor Csardi csardi@rmki.kfki.hu

_S_e_e _A_l_s_o:

     'graph'

_E_x_a_m_p_l_e_s:

     g <- graph.ring(10)
     vcount(g)
     ecount(g)
     neighbors(g, 5)
     are.connected(g, 1, 2)
     are.connected(g, 2, 4)
     get.edges(g, 0:5)

