Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

dg.FactorVertex-class

Class dg.FactorVertex


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

Examples

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

dynamicGraph

v0.2.2.6
GPL (>= 2)
Authors
Jens Henrik Badsberg <coco@badsberg.eu>
Initial release
2010/01/30

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.