adjacencyList-class          package:giRaph          R Documentation

_C_l_a_s_s "_a_d_j_a_c_e_n_c_y_L_i_s_t"

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

     A class for adjacency list representation of multi-graphs

_O_b_j_e_c_t_s _f_r_o_m _t_h_e _C_l_a_s_s:

     Objects can be created by calls of the form
     'new("adjacencyList",id,pa,ne)'.

_S_l_o_t_s:

     '._D_a_t_a': Object of class '"list"'; each element represents a
          vertex and is in turn a 'list' of (at most) three elements,
          namely 'pa', 'ne' and 'ch' storing, respectively, the numeric
          identifiers of parents, neighbours and children

_E_x_t_e_n_d_s:

     Class '"list"', from data part. Class '"vector"', by class
     '"list"'.

_M_e_t_h_o_d_s:

     _i_n_i_t_i_a_l_i_z_e 'signature(.Object = "adjacencyList")': constructs an
          adjacency list representation of a multi-graph from a vertex
          set 'id', a list 'pa' of parent numeric identifiers, a list
          'ch' of children numeric identifiers, and a list 'ne' of
          neighbour numeric identifiers

     _s_h_o_w 'signature(object = "adjacencyList")': displays an adjacency
          list representation 

     _n_a_m_e_s 'signature(x = "adjacencyList")': gets the character vertex
          identifiers of an adjacency list

     _n_a_m_e_s<- 'signature(x = "adjacencyList")': sets the character
          vertex identifiers of an adjacency list

     _c_a_r_d 'signature(object = "adjacencyList")': returns the number of
          vertices and the total number of edge occurrences in an
          adjacency list

     _i_s_E_m_p_t_y 'signature(object = "adjacencyList")': an adjacency list
          is empty if it has no entries

     _i_s_P_r_e_s_e_n_t 'signature(el = "undirectedEdge", ou =
          "adjacencyList")': tells whether an undirected edge occurs in
          the multi-graph represented by an adjacency list

     _i_s_P_r_e_s_e_n_t 'signature(el = "directedEdge", ou = "adjacencyList")':
          tells whether a directed edge occurs in the multi-graph
          represented by an adjacency list

     _a_r_e_T_h_e_S_a_m_e 'signature(x = "adjacencyList", y = "adjacencyList")':
          x and y are the same adjacency list if they represent the
          same multi-graph

     [ 'signature(x = "adjacencyList")': extracts the adjacency list of
          an induced subgraph

     [[ 'signature(x = "adjacencyList")': extracts the character
          identifier of a vertex

     _c_o_e_r_c_e 'signature(from = "incidenceList", to = "adjacencyList")':
          converts an incidence list to an adjacency list by dropping
          all but ordinary directed and undirected edges

     _c_o_e_r_c_e 'signature(from = "incidenceMatrix", to =
          "adjacencyList")': converts an incidence matrix to an
          adjacency matrix by dropping hyper-edges

     _c_o_e_r_c_e 'signature(from = "adjacencyMatrix", to =
          "adjacencyList")': converts an adjacency matrix to an
          adjacency list

     + 'signature(e1 = "adjacencyList", e2 = "vertexSet")': adds a
          vertex set to an adjacency list by making the new vertices
          isolated

     - 'signature(e1 = "adjacencyList", e2 = "vertexSet")': removes a
          vertex set from an adjacency list by dropping all edges
          involving the vertex set

     + 'signature(e1 = "adjacencyList", e2 = "undirectedEdge")': adds
          an ordinary undirected edge to an adjacency list

     + 'signature(e1 = "adjacencyList", e2 = "directedEdge")': adds an
          ordinary directed edge to an adjacency list

     - 'signature(e1 = "adjacencyList", e2 = "undirectedEdge")':
          removes an undirected edge from an adjacency list

     - 'signature(e1 = "adjacencyList", e2 = "directedEdge")': removes
          a directed edge from an adjacency list

     * 'signature(e1 = "adjacencyMatrix", e2 = "vertexSet")': restricts
          an adjacency matrix to a vertex set by dropping all edges
          involving vertices outside the vertex set

_W_a_r_n_i_n_g:

     The 'pa', 'ch' and 'ne' constructor input lists are silently
     discarded if their length differs from the actual number of
     vertices (determined by 'id'). All input numeric identifiers
     greater than this number are also silently discarded by the
     constructor. The 'id' input to constructor is mandatory, since the
     constructor needs to identify vertices. In addition, at least one
     between 'pa' and 'ch' should be present, if directed edges have to
     be specified, and 'ne' should be present, if undirected edges have
     to be specified. If both 'pa' and 'ch' are present, the union of
     the two corresponding multi-sets of edges is specified. If the
     neighbourhood relationship specified by 'ne' is not symmetric, it
     is made symmetric by the constructor.

_N_o_t_e:

     The 'names<-' replacement method works only if the names to be
     assigned can be used to construct a 'vertexSet' object having the
     right cardinality, otherwise the names are left unchanged and a
     warning message is given.

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

     Jens Henrik Badsberg, Claus Dethlefsen, Luca La Rocca

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

     'adjacencyList' and 'multiGraph-class'

