dg.FactorVertex-class: Class dg.FactorVertex

Description Slots Extends Methods Note Author(s) See Also Examples

Description

A skeleton class for the classes of factor vertices.

Slots

fixed.positions:

Object of class "logical": If FALSE, then the factor will follow the vertices when the positions of the vertices are changed.

vertex.indices:

Object of class "numeric": The vertex.indices of the vertices of the factor.

name:

Object of class "character", see "dg.Vertex".

index:

Object of class "numeric", see "dg.Vertex".

position:

Object of class "numeric", see "dg.Vertex".

blockindex:

Object of class "numeric", see "dg.Vertex".

stratum:

Object of class "numeric", see "dg.Vertex".

constrained:

Object of class "logical", see "dg.Vertex".

color:

Object of class "character", see "dg.Vertex".

label:

Object of class "character", see "dg.Vertex".

label.position:

Object of class "numeric", see "dg.Vertex".

Extends

Class "dg.Vertex", directly. Class "dg.Node", directly.

Methods

fixed.positions<-

signature(x = "dg.FactorVertex"): ...

fixed.positions

signature(object = "dg.FactorVertex"): ...

index<-

signature(x = "dg.FactorVertex"): ...

index

signature(object = "dg.FactorVertex"): ...

initialize

signature(.Object = "dg.FactorVertex"): The method new also accepts the argument vertices or vertexList. The name, label, and position is then extracted from these vertices. The length of vertices should match vertex.indices, where vertex.indices is used to select vertices form vertexList.

nodeIndices<-

signature(x = "dg.FactorVertex"): ...

nodeIndices

signature(object = "dg.FactorVertex"): ...

Note

The methods (except stratum) of dg.Vertex also applies for dg.FactorVertex.

Author(s)

Jens Henrik Badsberg

See Also

returnFactorVerticesAndEdges, dg.FactorEdge-class, dg.Vertex-class, dg.Node-class, and validFactorClasses.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
vertices       <- returnVertexList(paste("V", 1:4, sep = ""), 
                                   types = rep("Discrete", 4))
vertex.indices <- c(1, 2, 3)
vertices       <- new("dg.VertexList", vertices[c(1, 2, 3)])
name           <- paste(Labels(vertices), collapse = ":")

factor <- new("dg.Generator", vertex.indices = vertex.indices,
              position = apply(Positions(vertices), 2, mean),
              index = 0, color = "yellow", name = name, label = name)

factor <- new("dg.FactorVertex", vertex.indices = 1:3, vertices = vertices)

factor <- new("dg.FactorVertex", vertex.indices = 1:3, vertexList = vertices)

str(factor)

color(factor)
label(factor)
labelPosition(factor)
name(factor)
index(factor)
position(factor)
nodeIndices(factor)

color(factor) <- "green"
label(factor) <- "v-1-2-3"
labelPosition(factor) <- c(1, 2, 3)
name(factor) <- "V-123" 
index(factor) <- 3
position(factor) <- c( 10,  20,  30,  40)

str(factor)

dynamicGraph documentation built on May 29, 2017, 8:01 p.m.