Learn R Programming

dynamicGraph (version 0.2.2.6)

dg.simple.graph-class: Class dg.simple.graph

Description

A simple representation of a graph for dynamicGraph. Vertices are represented by text-strings for names or numbers for indices, edges by indices or names of vertices, etc.

Arguments

Objects from the Class

Objects can be created by calls of the form new("dg.simple.graph", ...).

Slots

viewType:
Object of class "character": A text string with the type of view.
vertex.names:
Object of class "vector": A vector with text strings for the names of the vertices.
types:
Object of class "character": A vector with text strings for the types, labels of dg.Vertex, of the vertices.
labels:
Object of class "vector": A vector with text strings for the labels of the vertices.
from:
Object of class "vector": If not edge.list is given: The indices of the first endpoints of the edges.
to:
Object of class "vector": If not edge.list is given: The indices of the second endpoints of the edges.
edge.list:
Object of class "list": If not from and to are given: A list where each item specifies an edge by a vector of the indices or names of the vertices.
edge.types:
Object of class "character": A vector of text strings giving the types of the edges, identify which classes the edges should be of, containing the dg.VertexEdge.
blocks:
Object of class "list": A list defining the blocks: Each item is the vector of the indices of the vertices of the block, or the vector with text strings for the names of the vertices of the block. The arguments right.to.left, nested.blocks and blockColors are here used in setBlocks to control the layout of the blocks.
block.tree:
Object of class "list": If not the argument blocks is used: A structure with the blocks in a block.tree. The arguments overlaying and blockColors are here used in setTreeBlocks to control the layout of the blocks.
oriented:
Object of class "logical": Logical. If oriented is set to TRUE then the edges are oriented, also when no block structure is given.
factors:
Object of class "list": A list defining the factor vertices: Each item is the vector of the indices of the vertices of a factor.
texts:
Object of class "character": A vector of text strings, for additional labels. These labels will be set by 'ExtraVertices' of class dg.TextVertex-class.
extra.from:
Object of class "vector": If not extra.edge.list is given: The indices of the first endpoints of the extra edges, negative for extra vertices.
extra.to:
Object of class "vector": If not extra.edge.list is given: The indices of the second endpoints of the extra edges, negative for extra vertices.
extra.edge.list:
Object of class "list": If not extra.from and extra.to are given: A list where each item specifies an extra edge by a vector of the indices or names of the vertices or extra vertices, negative indices for extra vertices.

Methods

addModel
signature(object = "dg.simple.graph"): ...
addView
signature(object = "dg.simple.graph"): ...
coerce
signature(from = "dg.simple.graph", to = "dg.graph"): ...
dg
signature(object = "dg.simple.graph"): ...
replaceModel
signature(object = "dg.simple.graph"): ...
replaceView
signature(object = "dg.simple.graph"): ...

See Also

dg.graph-class, and DynamicGraph.

Examples

Run this code
x <- new("dg.simple.graph", vertex.names = c("a", "b"), 
         from = 1, to = 2) ; str(x)
dg(new("dg.simple.graph", vertex.names = c("a", "b"), 
       edge.list = list(c(1, 2))))

Run the code above in your browser using DataLab