| adjacencyMatrix-class {giRaph} | R Documentation |
A class for adjacency matrix representation of simple-graphs
Objects can be created by calls of the form new("adjacencyMatrix",X).
.Data:"matrix"; standard 0-1 coding
for ordinary directed and undirected edges
Class "matrix", from data part.
Class "structure", by class "matrix".
Class "array", by class "matrix".
Class "vector", by class "matrix", with explicit coerce.
signature(.Object = "adjacencyMatrix"):
constructs an adjacency matrix representation of a simple-graph from a 0-1 matrixsignature(object = "adjacencyMatrix"): displays an adjacency matrix representation signature(x = "adjacencyMatrix"): gets the character vertex identifiers of an adjacency matrixsignature(x = "adjacencyMatrix"): sets the character vertex identifiers of an adjacency matrixsignature(object = "adjacencyMatrix"):
returns the number of vertices and the total number of edges (directed and undirected) in an incidence matrixsignature(object = "adjacencyMatrix"):
an adjacency matrix is empty if it has no entriessignature(el = "undirectedEdge", ou = "adjacencyMatrix"):
tells whether an undirected edge occurs in the graph represented by an adjacency matrixsignature(el = "directedEdge", ou = "adjacencyMatrix"):
tells whether a directed edge occurs in the graph represented by an adjacency matrixsignature(x = "adjacencyMatrix", y = "adjacencyMatrix"):
x and y are the same adjacency matrix if they represent the same simple-graphsignature(x = "adjacencyMatrix"): extracts the adjacency matrix of an induced subgraphsignature(x = "adjacencyMatrix"): extracts the character identifier of a vertexsignature(from = "incidenceList", to = "adjacencyMatrix"):
converts an incidence list to an adjacency matrix by keeping ordinary directed and undirected edges
and dropping loops and parallel edgessignature(from = "incidenceMatrix", to = "adjacencyMatrix"):
converts an incidence matrix to an adjacency matrix by dropping hyper-edges, loops and parallel edgessignature(from = "adjacencyList", to = "adjacencyMatrix"):
converts an adjacency list to an adjacency matrix by dropping loops and parallel edgessignature(e1 = "adjacencyMatrix", e2 = "vertexSet"):
adds a vertex set to an adjacency matrix by making the new vertices isolatedsignature(e1 = "adjacencyMatrix", e2 = "vertexSet"):
removes a vertex set from an adjacency matrix by dropping all edges involving the vertex setsignature(e1 = "adjacencyMatrix", e2 = "undirectedEdge"):
adds an ordinary undirected edge (not a loop) to an adjacency matrixsignature(e1 = "adjacencyMatrix", e2 = "directedEdge"):
adds an ordinary directed edge to an adjacency matrixsignature(e1 = "adjacencyMatrix", e2 = "undirectedEdge"):
removes an undirected edge from an adjacency matrixsignature(e1 = "adjacencyMatrix", e2 = "directedEdge"):
removes a directed edge from an adjacency matrixsignature(e1 = "adjacencyMatrix", e2 = "vertexSet"):
restricts an adjacency matrix to a vertex set by dropping all edges involving vertices outside the vertex setAll input non-zero diagonal entries are silently changed to zero by the constructor.
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.
Jens Henrik Badsberg, Claus Dethlefsen, Luca La Rocca
adjacencyMatrix and simpleGraph-class