multiGraph-class: Class "multiGraph"

Description Objects from the Class Slots Extends Methods Note Author(s) See Also

Description

A class for multi-graphs.

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

Note

Graphical representation via package 'dynamicGraph' is based on coercion to class dg.graph, implemented via coercion to class dg.simple.graph. Coercion to class dg.simple.graph is implemented via coercion to class simpleGraph, thus dropping loops and parallel edges. Graphical representation via package 'mathgraph' is obtained by means of coercion to class simpleGraph.

Author(s)

Jens Henrik Badsberg, Claus Dethlefsen, Luca La Rocca

See Also

adjacencyList-class and adjacencyList


giRaph documentation built on May 30, 2017, 3:40 a.m.