simpleGraph-class {giRaph}R Documentation

Class "simpleGraph"

Description

A class for simple-graphs

Objects from the Class

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

Slots

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

Extends

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

Methods

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

Note

Graphical representation via package 'dynamicGraph' is based on coercion to class dg.graph, implemented via coercion to class dg.simple.graph.

Author(s)

Jens Henrik Badsberg, Claus Dethlefsen, Luca La Rocca

See Also

adjacencyMatrix-class and adjacencyMatrix


[Package giRaph version 0.1-1 Index]