Learn R Programming

giRaph (version 0.1.2)

multiGraph-class: Class "multiGraph"

Description

A class for multi-graphs.

Arguments

Objects from the Class

Objects can be created by calls of the form new("multiGraph", ...). A multiGraph object consists of three slots, one for each possible representation: adjacencyList, incidenceMatrix and incidenceList.

Slots

adjacencyList:
Object of class "adjacencyList"
incidenceMatrix:
Object of class "incidenceMatrix"
incidenceList:
Object of class "incidenceList"

Extends

Class "generalGraph", directly, with explicit coerce. Class "anyGraph", directly, with explicit coerce.

Methods

initialize
signature(.Object="multiGraph"): constructs a multi-graph from one of the three possible representations
show
signature(object = "multiGraph"): displays the available representations of a multi-graph
display
signature(x = "multiGraph"): static graphical representation via package 'mathgraph'
dynamic.Graph
signature(object = "multiGraph"): dynamic graphical representation via package 'dynamicGraph'
incidenceList<-
signature(x = "multiGraph"): sets the incidence list representation
incidenceMatrix<-
signature(x = "multiGraph"): sets the incidence matrix representation
adjacencyList<-
signature(x = "multiGraph"): sets the adjacency list representation
incidenceList
signature(object = "multiGraph"): gets the incidence list representation
incidenceMatrix
signature(object = "multiGraph"): gets the incidence matrix representation
adjacencyList
signature(object = "multiGraph"): gets the adjacency list representation
names
signature(x = "multiGraph"): gets the character vertex identifiers of a multi-graph
names<-
signature(x = "multiGraph"): sets the character vertex identifiers of a multi-graph
card
signature(object = "multiGraph"): returns the number of vertices and the total number of edge occurrences in a multi-graph
isEmpty
signature(object = "multiGraph"): a graph object is empty if all its possible representations are empty
isPresent
signature(el = "edge", ou = "multiGraph"): an edge occurs in a graph object if it occurs in its non-empty slots
areTheSame
signature(x = "multiGraph", y = "multiGraph"): x and y are the same if their non-empty slots represent the same graph
[
signature(x = "multiGraph"): extracts an induced subgraph
[[
signature(x = "multiGraph"): extracts the character identifier of a vertex
coerce
signature(from = "anyGraph", to = "multiGraph"): all but ordinary directed and undirected edges are lost in the conversion
coerce
signature(from = "generalGraph", to = "multiGraph"): hyper-edges are lost in the conversion
coerce
signature(from = "simpleGraph", to = "multiGraph"): no edges are lost in the conversion as every simple-graph is a multi-graph
coerce
signature(from = "multiGraph", to = "dg.simple.graph"): conversion to class 'dg.simple.graph' of package 'dynamicGraph'
coerce
signature(from = "multiGraph", to = "dg.graph"): conversion to class 'dg.graph' of package 'dynamicGraph'
+
signature(e1 = "multiGraph", e2 = "vertexSet"): adds a vertex set to a multi-graph by making the new vertices isolated
-
signature(e1 = "multiGraph", e2 = "vertexSet"): removes a vertex set from a multi-graph by dropping all edges involving the vertex set
+
signature(e1 = "multiGraph", e2 = "edge"): adds an edge to a multi-graph
-
signature(e1 = "multiGraph", e2 = "edge"): removes an edge from a multi-graph
*
signature(e1 = "multiGraph", e2 = "vertexSet"): restricts a multi-graph to a vertex set by dropping all edges involving vertices outside the vertex set

See Also

adjacencyList-class and adjacencyList