simpleGraph-class {giRaph} | R Documentation |
A class for simple-graphs
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
.
adjacencyMatrix
:"adjacencyMatrix"
adjacencyList
:"adjacencyList"
incidenceMatrix
:"incidenceMatrix"
incidenceList
:"incidenceList"
Class "multiGraph"
, directly, with explicit coerce.
Class "generalGraph"
, directly, with explicit coerce.
Class "anyGraph"
, directly, with explicit coerce.
signature(.Object="simpleGraph")
:
constructs a simple-graph from one of the four possible representationssignature(object = "simpleGraph")
: displays the available representations of a simple graphsignature(x = "simpleGraph")
: static graphical representation via package 'mathgraph'signature(object = "simpleGraph")
:
dynamic graphical representation via package 'dynamicGraph'signature(x = "simpleGraph")
: sets the incidence list representationsignature(x = "simpleGraph")
: sets the incidence matrix representationsignature(x = "simpleGraph")
: sets the adjacency list representationsignature(x = "simpleGraph")
: sets the adjacency matrix representationsignature(object = "simpleGraph")
: gets the incidence list representationsignature(object = "simpleGraph")
: gets the incidence matrix representationsignature(object = "simpleGraph")
: gets the adjacency list representationsignature(object = "simpleGraph")
: gets the adjacency matrix representationsignature(x = "simpleGraph")
: gets the character vertex identifiers of a simple graphsignature(x = "simpleGraph")
: sets the character vertex identifiers of a simple graphsignature(object = "simpleGraph")
:
returns the number of vertices and the total number of edges (directed and undirected) in a simple graphsignature(object = "simpleGraph")
:
a graph object is empty if all its possible representations are emptysignature(el = "edge", ou = "simpleGraph")
:
an edge occurs in a graph object if it occurs in its non-empty slotssignature(x = "simpleGraph", y = "simpleGraph")
:
x and y are the same if their non-empty slots represent the same graphsignature(x = "simpleGraph")
: extracts an induced subgraphsignature(x = "simpleGraph")
: extracts the character identifier of a vertexsignature(from = "anyGraph", to = "simpleGraph")
:
only ordinary directed and undirected edges, but no loops nor parallel edges, are kept in the conversionsignature(from = "generalGraph", to = "simpleGraph")
:
hyper-edges, loops and parallel edges are lost in the conversionsignature(from = "multiGraph", to = "simpleGraph")
:
loops and parallel edges are lost in the conversionsignature(from = "mathgraph", to = "simpleGraph")
:
conversion from class 'mathgraph' of package 'mathgraph'signature(from = "simpleGraph", to = "mathgraph")
:
conversion to class 'mathgraph' of package 'mathgraph'signature(from = "simpleGraph", to = "dg.simple.graph")
:
conversion to class 'dg.simple.graph' of package 'dynamicGraph'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 isolatedsignature(e1 = "simpleGraph", e2 = "vertexSet")
:
removes a vertex set from a simple graph by dropping all edges involving the vertex setsignature(e1 = "simpleGraph", e2 = "undirectedEdge")
:
adds an ordinary undirected edge (not a loop) to a simple graphsignature(e1 = "simpleGraph", e2 = "directedEdge")
:
adds an ordinary directed edge to a simple graphsignature(e1 = "simpleGraph", e2 = "edge")
:
removes an edge from a simple graphsignature(e1 = "simpleGraph", e2 = "vertexSet")
:
restricts a simple 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
,
implemented via coercion to class dg.simple.graph
.
Jens Henrik Badsberg, Claus Dethlefsen, Luca La Rocca
adjacencyMatrix-class
and adjacencyMatrix