adjacencyList-class {giRaph} | R Documentation |
A class for adjacency list representation of multi-graphs
Objects can be created by calls of the form new("adjacencyList",id,pa,ne)
.
.Data
:"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
Class "list"
, from data part.
Class "vector"
, by class "list"
.
signature(.Object = "adjacencyList")
:
constructs an adjacency list representation of a multi-graph from a vertex set id
,
a list pa
of parent numeric identifiers and a list ne
of neighbour numeric identifierssignature(object = "adjacencyList")
: displays an adjacency list representation signature(x = "adjacencyList", y = "adjacencyList")
:
x and y are the same adjacency list if they represent the same multi-graphsignature(x = "adjacencyList")
: extracts the subgraph induced by the selected verticessignature(from = "incidenceList", to = "adjacencyList")
:
converts an incidence list to an adjacency list by dropping all but ordinary directed and undirected edgessignature(from = "incidenceMatrix", to = "adjacencyList")
:
converts an incidence matrix to an adjacency matrix by dropping hyper-edgessignature(from = "adjacencyMatrix", to = "adjacencyList")
:
converts an adjacency matrix to an adjacency listsignature(e1 = "adjacencyList", e2 = "vertexSet")
:
adds a vertex set to an adjacency list by making the new vertices isolatedsignature(e1 = "adjacencyList", e2 = "vertexSet")
:
removes a vertex set from an adjacency list by dropping all edges involving the vertex setsignature(e1 = "adjacencyList", e2 = "undirectedEdge")
:
adds an ordinary undirected edge to an adjacency listsignature(e1 = "adjacencyList", e2 = "undirectedEdge")
:
removes an undirected edge from an adjacency listsignature(e1 = "adjacencyList", e2 = "directedEdge")
:
adds an ordinary directed edge to an adjacency listsignature(e1 = "adjacencyList", e2 = "directedEdge")
:
removes a directed edge from an adjacency listAll input numeric identifiers that are greater than the actual number of vertices are silently discarded by the constructor.
Jens Henrik Badsberg, Claus Dethlefsen, Luca La Rocca
adjacencyList
and multiGraph-class