incidenceList-class: Class "incidenceList"
Description
A class for incidence list representation of any graphObjects from the Class
Objects can be created by calls of the form new("incidenceList", V, E)
.Slots
V
:- Object of class
"vertexSet"
E
:- Object of class
"edgeList"
Methods
- initialize
signature(.Object = "incidenceList")
: constructs an incidence list representation
of a graph from a vertex set and a mult-set of edges - show
signature(object = "incidenceList")
: displays an incidence list representation - names
signature(x = "incidenceList")
: gets the character vertex identifiers of an incidence list - names<-
signature(x = "incidenceList")
: sets the character vertex identifiers of an incidence list - card
signature(object = "incidenceList")
:
returns the number of vertices and the total number of edge occurrences in an incidence list - isEmpty
signature(object = "incidenceList")
:
an incidence list is empty if such is its vertex set - isPresent
signature(el = "edge", ou = "incidenceList")
:
tells whether an edge occurs in the graph represented by an incidence list - areTheSame
signature(x = "incidenceList", y = "incidenceList")
:
x and y are the same incidence list if they represent the same graph - [
signature(x = "incidenceList")
: extracts the incidence list of an induced subgraph - [[
signature(x = "incidenceList")
: extracts the character identifier of a vertex - coerce
signature(from = "incidenceMatrix", to = "incidenceList")
:
converts an incidence matrix to an incidence list - coerce
signature(from = "adjacencyList", to = "incidenceList")
:
converts an adjacency list to an incidence list - coerce
signature(from = "adjacencyMatrix", to = "incidenceList")
:
converts an adjacency matrix to an incidence list - +
signature(e1 = "incidenceList", e2 = "vertexSet")
:
adds a vertex set to an incidence list by making the new vertices isolated - -
signature(e1 = "incidenceList", e2 = "vertexSet")
:
removes a vertex set from an incidence list by dropping all edges involving the vertex set - +
signature(e1 = "incidenceList", e2 = "edge")
: adds an edge to an incidence list - -
signature(e1 = "incidenceList", e2 = "edge")
: removes an edge from an incidence list - *
signature(e1 = "incidenceList", e2 = "vertexSet")
:
restricts an incidence list to a vertex set by dropping all edges involving vertices outside the vertex set
Warning
All input edges whose maximum numeric identifier is greater than
the actual number of vertices are silently discarded by the constructor.