Learn R Programming

dynamicGraph (version 0.2.2.6)

dg.VertexEdge-class: Class dg.VertexEdge

Description

The class for edges between vertices.

Arguments

Objects from the Class

Objects has the methods for extracting and setting the slots for edges, and the method for drawing the edge.

Slots

oriented:
Object of class "logical". If oriented is NA then the edge is drawn as an arrow if the vertices of the edge are in different blocks, oriented according to the strata of the blocks. If oriented is NA and the vertices of the edge are in the same block, then an undirected edge is drawn. If oriented is TRUE then an arrow is drawn from the first vertex of the edge to the second. If oriented is FALSE then an undirected edge is drawn, also between blocks.
vertex.indices:
Object of class "numeric", see "dg.Edge". These are the indices of the vertices in the list of vertices.
width:
Object of class "numeric", see "dg.Edge".
dash:
Object of class "character", see "dg.Edge".
color:
Object of class "character", see "dg.Edge".
label:
Object of class "character", see "dg.Edge".
label.position:
Object of class "numeric", see "dg.Edge".

Extends

Class "dg.Edge", directly. Class "dg.Node", directly.

Methods

nodeTypesOfEdge
signature(object = "dg.VertexEdge"): ...
oriented<-
signature(x = "dg.VertexEdge"): ...
oriented
signature(object = "dg.VertexEdge"): ...
propertyDialog
signature(object = "dg.VertexEdge"): ...

Details

Edges are not constrained to have two vertices.

See Also

newVertexEdge, returnEdgeList, dg.Edge-class.

Examples

Run this code
vertices <- returnVertexList(paste("V", 1:4, sep = ""))
e <- new("dg.VertexEdge", vertex.indices = c(1, 2, 3), 
         vertices = new("dg.VertexList", vertices[1:3]))

str(e)

color(e)
label(e)
labelPosition(e)
width(e)
oriented(e)
nodeIndicesOfEdge(e)
nodeTypesOfEdge(e)

color(e) <- "Black"
label(e) <- "1-2"
labelPosition(e) <- c(10, 20, 30)
width(e) <- 1
oriented(e) <- TRUE
nodeIndicesOfEdge(e) <- c(1, 2)

str(e)

Run the code above in your browser using DataLab