dg.VertexEdge-class {dynamicGraph}R Documentation

Class "dg.VertexEdge"

Description

The class for edges between vertices.

Usage

newVertexEdge(vertex.indices, vertices = NULL, width = 2,
              color = "DarkOliveGreen", oriented = FALSE, type = "VertexEdge",
              label = ifelse(is.null(vertices), "",
                             paste(Labels(vertices), collapse = "~")),
              dash = "", N = 3, edgeClasses = validEdgeClasses())

Arguments

vertex.indices Integer vector of the vertex.indices of the vertices of the edge. These are the indices of the vertices in the list of vertices.
vertices All the vertices of the edge, and only the vertices of the edge. Currently, only used for setting the default label.
width Numeric, for the width of the edge.
color Text string for the color of the edge.
oriented Logical, TRUE if the edge is oriented, also when no blocks are used in dynamicGraphMain.
type Text string for the type of the edge. Currently not used. Intended to set which class the edge should be class of containing the class dg.Edge.
label Text string for the label of the edge. By default set by concatenating the labels of the vertices.
dash Text string for the color pattern of the edge.
N Integer, N is the number of coordinates of the vertices.
edgeClasses Returned value from validEdgeClasses, or extension of this matrix.

Details

Edges are not constrained to have two vertices.

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 TRUE, then the edge is oriented, and thus drawn by an arrow, also when no blocks are pressent.
vertex.indices:
Object of class "numeric", see "dg.Edge".
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", by class "dg.Edge".

Methods

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

Note

The dg.Edge class has beside the methods of dg.Vertex the methods oriented and oriented<-.

The method nodeIndicesOfEdge will extract the indices of the vertices of the edge, and the method nodeTypesOfEdge will extract the types ("super classes": vertex, factor or block) of the vertices (nodes) of an edge. The method draw is used to draw the edge, and items are added to the pop up menu of an edge by the method addToPopups.

Some of these methods also applies for block edges (dg.BlockEdge) and factor edges (dg.FactorEdge).

Author(s)

Jens Henrik Badsberg

See Also

newVertexEdge, returnEdgeList, dg.Edge-class.

Examples

vertices <- returnVertexList(paste("V", 1:4, sep = ""))
e <- newVertexEdge(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)




[Package Contents]