dg.Vertex-class {dynamicGraph}R Documentation

Class "dg.Vertex"

Description

A skeleton class for the classes of vertices.

Usage

newVertex(name, label = name, type = "dg.Vertex", index = 1,
          position = c(0, 0, 0), blockindex = 0, stratum = 0,
          color = ifelse(type == "TextVertex", "GhostWhite", "SaddleBrown"),
          vertexClasses = validVertexClasses())

Arguments

name Text string with the name of the vertex. Should be a valid name on variables for your model object.
label Text string with the label of the vertex.
type Text string with the type of the vertex. This type is the label of class of the vertex, the labels of vertexClasses.
index Integer with the index of the vertex, the position in a vertex list.
position Numeric vector with the position of the vertex. Vertices in the same dynamic graph should have the same number of coordinates.
blockindex Integer with the blockindex of the vertex.
stratum Integer with the stratum of the vertex.
color Text string with the color of the vertex.
vertexClasses The valid vertexClasses.

Objects from the Class

Objects has the methods for extracting and setting the slots for vertices.

Slots

name:
Object of class "character" with the name of the vertex. Should be a valid name on variables for your model object.
index:
Object of class "numeric" with the index of the vertex, the position of the vertex in a vertex list.
position:
Object of class "numeric" with the position of the vertex. Vertices in the same dynamic graph should have the same number of coordinates.
blockindex:
Object of class "numeric" with the blockindex of the vertex.
stratum:
Object of class "numeric" with the stratum of the vertex.
color:
Object of class "character" with the color of the vertex.
label:
Object of class "character" with the label of the vertex.
label.position:
Object of class "numeric" with the label.position of the vertex. Labels of vertices in the same dynamic graph should have the same number of coordinates.

Extends

Class "dg.Node", directly.

Methods

ancestors<-
signature(x = "dg.Vertex"): ...
ancestors
signature(object = "dg.Vertex"): ...
blockindex<-
signature(x = "dg.Vertex"): ...
blockindex
signature(object = "dg.Vertex"): ...
descendants<-
signature(x = "dg.Vertex"): ...
descendants
signature(object = "dg.Vertex"): ...
index<-
signature(x = "dg.Vertex"): ...
index
signature(object = "dg.Vertex"): ...
name<-
signature(x = "dg.Vertex"): ...
name
signature(object = "dg.Vertex"): ...
position<-
signature(x = "dg.Vertex"): ...
position
signature(object = "dg.Vertex"): ...
stratum<-
signature(x = "dg.Vertex"): ...
stratum
signature(object = "dg.Vertex"): ...
visible<-
signature(x = "dg.Vertex"): ...
visible
signature(object = "dg.Vertex"): ...
propertyDialog
signature(object = "dg.Node"): ...

Note

The dg.Vertex class has the methods name, label, labelPosition, position, stratum, color, and index for extracting values of the object and the replacement methods name<-, label<-, labelPosition<-, position<-, stratum<-, color<-, and index<-. The method draw is used to draw a vertex, and items can be added to the pop up menu of the vertex by the method addToPopups.

Some of these methods also applies for edges (dg.Edge), blocks (dg.Block), block edges (dg.BlockEdge), factor vertices (dg.FactorVertex) and edges from vertices to factors (dg.FactorEdge).

Author(s)

Jens Henrik Badsberg

See Also

returnVertexList, dg.Node-class.

Examples


a <- newVertex("a", "A", "Discrete", 1, c(0, 0, 0))

str(a)

color(a)
label(a)
labelPosition(a)
name(a)
index(a)
position(a)
stratum(a)

color(a) <- "red"
label(a) <- "A vertex"
labelPosition(a) <- c(1, 2, 3)
name(a) <- "Capital.A"
index(a) <- -1
position(a) <- c(10, 20, 30)
stratum(a) <- 1

str(a)




[Package Contents]