adjacencyMatrix-class {giRaph}R Documentation

Class "adjacencyMatrix"

Description

A class for adjacency matrix representation of simple-graphs

Objects from the Class

Objects can be created by calls of the form new("adjacencyMatrix",X).

Slots

.Data:
Object of class "matrix"; standard 0-1 coding for ordinary directed and undirected edges

Extends

Class "matrix", from data part. Class "structure", by class "matrix". Class "array", by class "matrix". Class "vector", by class "matrix", with explicit coerce.

Methods

initialize
signature(.Object = "adjacencyMatrix"): constructs an adjacency matrix representation of a simple-graph from a 0-1 matrix
isEmpty
signature(object = "adjacencyMatrix"): an adjacency matrix is empty if it has no entries
areTheSame
signature(x = "adjacencyMatrix", y = "adjacencyMatrix"): x and y are the same adjacency matrix if they represent the same simple-graph
coerce
signature(from = "incidenceList", to = "adjacencyMatrix"): converts an incidence list to an adjacency matrix by keeping ordinary directed and undirected edges and dropping loops and parallel edges
coerce
signature(from = "incidenceMatrix", to = "adjacencyMatrix"): converts an incidence matrix to an adjacency matrix by dropping hyper-edges, loops and parallel edges
coerce
signature(from = "adjacencyList", to = "adjacencyMatrix"): converts an adjacency list to an adjacency matrix by dropping loops and parallel edges
names
signature(x = "adjacencyMatrix"): gets the character vertex identifiers of an adjacency matrix
+
signature(e1 = "adjacencyMatrix", e2 = "vertexSet"): adds a vertex set to an adjacency matrix by making the new vertices isolated
-
signature(e1 = "adjacencyMatrix", e2 = "vertexSet"): removes a vertex set from an adjacency matrix by dropping all edges involving the vertex set
+
signature(e1 = "adjacencyMatrix", e2 = "undirectedEdge"): adds an ordinary undirected edge (not a loop) to an adjacency matrix
-
signature(e1 = "adjacencyMatrix", e2 = "undirectedEdge"): removes an undirected edge from an adjacency matrix
+
signature(e1 = "adjacencyMatrix", e2 = "directedEdge"): adds an ordinary directed edge to an adjacency matrix
-
signature(e1 = "adjacencyMatrix", e2 = "directedEdge"): removes a directed edge from an adjacency matrix

Warning

All input non-zero diagonal entries are silently changed to zero by the constructor.

Author(s)

Jens Henrik Badsberg, Claus Dethlefsen, Luca La Rocca

See Also

adjacencyMatrix and simpleGraph-class


[Package giRaph version 0.0.0.11 Index]