adjacencyList-class {giRaph}R Documentation

Class "adjacencyList"

Description

A class for adjacency list representation of multi-graphs

Objects from the Class

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

Slots

.Data:
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

Extends

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

Methods

initialize
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 identifiers
show
signature(object = "adjacencyList"): displays an adjacency list representation
areTheSame
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 subgraph induced by the selected vertices
coerce
signature(from = "incidenceList", to = "adjacencyList"): converts an incidence list to an adjacency list by dropping all but ordinary directed and undirected edges
coerce
signature(from = "incidenceMatrix", to = "adjacencyList"): converts an incidence matrix to an adjacency matrix by dropping hyper-edges
coerce
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 = "undirectedEdge"): removes an undirected edge from an adjacency list
+
signature(e1 = "adjacencyList", e2 = "directedEdge"): adds an ordinary directed edge to an adjacency list
-
signature(e1 = "adjacencyList", e2 = "directedEdge"): removes a directed edge from an adjacency list

Warning

All input numeric identifiers that are greater than the actual number of vertices are silently discarded by the constructor.

Author(s)

Jens Henrik Badsberg, Claus Dethlefsen, Luca La Rocca

See Also

adjacencyList and multiGraph-class


[Package giRaph version 0.0.0.11 Index]