generalGraph-class {giRaph} | R Documentation |
A class for general graphs.
Objects can be created by calls of the form new("generalGraph", ...)
.
A generalGraph
object consists of two slots, one for each possible representation:
incidenceMatrix
and incidenceList
.
incidenceMatrix
:"incidenceMatrix"
incidenceList
:"incidenceList"
Class "anyGraph"
, directly, with explicit coerce.
signature(.Object="generalGraph")
:
constructs a general graph from one of the two possible representationssignature(object = "generalGraph")
: displays the available representations of a general graphsignature(x = "generalGraph")
: static graphical representation via package 'mathgraph'signature(object = "generalGraph")
:
dynamic graphical representation via package 'dynamicGraph'signature(x = "generalGraph")
: sets the incidence list representationsignature(x = "generalGraph")
: sets the incidence matrix representationsignature(object = "generalGraph")
: gets the incidence list representationsignature(object = "generalGraph")
: gets the incidence matrix representationsignature(x = "generalGraph")
: gets the character vertex identifiers of a general graphsignature(x = "generalGraph")
: sets the character vertex identifiers of a general graphsignature(object = "generalGraph")
:
returns the number of vertices and the total number of edge occurrences in a general graphsignature(object = "generalGraph")
:
a graph object is empty if all its possible representations are emptysignature(el = "edge", ou = "generalGraph")
:
an edge occurs in a graph object if it occurs in its non-empty slotssignature(x = "generalGraph", y = "generalGraph")
:
x and y are the same if their non-empty slots represent the same graphsignature(x = "generalGraph")
: extracts an induced subgraphsignature(x = "generalGraph")
: extracts the character identifier of a vertexsignature(from = "anyGraph", to = "generalGraph")
:
all but directed and undirected edges are lost in the conversionsignature(from = "multiGraph", to = "generalGraph")
:
no edges are lost in the conversion as every multi-graph is a general graphsignature(from = "simpleGraph", to = "generalGraph")
:
no edges are lost in the conversion as every simple-graph is a general graphsignature(from = "generalGraph", to = "dg.graph")
:
conversion to class 'dg.graph' of package 'dynamicGraph'signature(e1 = "generalGraph", e2 = "vertexSet")
:
adds a vertex set to a general graph by making the new vertices isolatedsignature(e1 = "generalGraph", e2 = "vertexSet")
:
removes a vertex set from a general graph by dropping all edges involving the vertex setsignature(e1 = "generalGraph", e2 = "edge")
:
adds an edge to a general graphsignature(e1 = "generalGraph", e2 = "edge")
:
removes an edge from a general graphsignature(e1 = "generalGraph", e2 = "vertexSet")
:
restricts a general graph to a vertex set by dropping all edges involving vertices outside the vertex set
Graphical representation via package 'dynamicGraph' is based on coercion to class dg.graph
.
Coercion to class dg.graph
is obtained by expanding hyper edges to sets of ordinary edges,
and using dashed lines for these. Graphical representation via package 'mathgraph' is obtained by means of
coercion to class simpleGraph
.
Jens Henrik Badsberg, Claus Dethlefsen, Luca La Rocca
incidenceMatrix-class
and incidenceMatrix