incidenceMatrix-class {giRaph}R Documentation

Class "incidenceMatrix"

Description

A class for incidence matrix representation of general graphs

Objects from the Class

Objects can be created by calls of the form new("incidenceMatrix", I).

Slots

.Data:
Object of class "matrix"; a column for each vertex and a row for each edge

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 = "incidenceMatrix"): constructs an incidence matrix representation of a general graph from a matrix of positive integers
show
signature(object = "incidenceMatrix"): displays an incidence matrix representation
names
signature(x = "incidenceMatrix"): gets the character vertex identifiers of an incidence matrix
names<-
signature(x = "incidenceMatrix"): sets the character vertex identifiers of an incidence matrix
card
signature(object = "incidenceMatrix"): returns the number of vertices and the total number of edge occurrences in an incidence matrix
isEmpty
signature(object = "incidenceMatrix"): an incidence matrix is empty if it has no columns
areTheSame
signature(x = "incidenceMatrix", y = "incidenceMatrix"): x and y are the same incidence matrix if they represent the same general graph
isPresent
signature(el = "undirectedEdge", ou = "incidenceMatrix"): tells whether an undirected edge occurs in the graph represented by an incidence matrix
isPresent
signature(el = "directedEdge", ou = "incidenceMatrix"): tells whether a directed edge occurs in the graph represented by an incidence matrix
[
signature(x = "incidenceList"): extracts the incidence matrix of an induced subgraph
[[
signature(x = "incidenceList"): extracts the character identifier of a vertex
coerce
signature(from = "incidenceList", to = "incidenceMatrix"): converts an incidence list to an incidence matrix by dropping all but undirected and directed edges
coerce
signature(from = "adjacencyList", to = "incidenceMatrix"): converts an adjacency list to an incidence matrix
coerce
signature(from = "adjacencyMatrix", to = "incidenceMatrix"): converts and adjacency matrix to an incidence matrix
+
signature(e1 = "incidenceMatrix", e2 = "vertexSet"): adds a vertex set to an incidence matrix by making the new vertices isolated
-
signature(e1 = "incidenceMatrix", e2 = "vertexSet"): removes a vertex set from an incidence matrix by dropping all edges involving the vertex set
+
signature(e1 = "incidenceMatrix", e2 = "undirectedEdge"): adds an undirected edge to an incidence matrix
+
signature(e1 = "incidenceMatrix", e2 = "directedEdge"): adds a directed edge to an incidence matrix
-
signature(e1 = "incidenceMatrix", e2 = "undirectedEdge"): removes an undirected edge from an incidence matrix
-
signature(e1 = "incidenceMatrix", e2 = "directedEdge"): removes a directed edge from an incidence matrix
*
signature(e1 = "incidenceMatrix", e2 = "vertexSet"): restricts an incidence matrix to a vertex set by dropping all edges involving vertices outside the vertex set

Warning

All zero input rows are discarded by the constructor.

Note

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.

Author(s)

Jens Henrik Badsberg, Claus Dethlefsen, Luca La Rocca

See Also

incidenceMatrix and generalGraph-class


[Package giRaph version 0.1-1 Index]