dg.FactorVertex-class {dynamicGraph}R Documentation

Class "dg.FactorVertex"

Description

A skeleton class for the classes of factor vertices.

Usage

newFactor(vertex.indices, vertices = NULL, 
          name = ifelse(is.null(vertices), "", 
                        paste(Labels(vertices), collapse = ":")),
          label = name, type = "Generator",
          index = 0, width = 2, color = "default",
          factorClasses = validFactorClasses())

Arguments

vertex.indices Integer vector of the vertex.indices of the vertices of the factor.
vertices The vertices of the factor. Used for setting the default label.
name Text string for the name of the factor vertex.
label Text string for the label of the factor vertex.
type Text string for the type, e.i. the class, of the factor vertex. Should be in factorClasses.
index Integer for the index of the factor vertex.
width Numeric, for the width of the factor vertex.
color Text string for the color of the factor vertex.
factorClasses The valid factorClasses.

Slots

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".
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", by class "dg.Vertex".

Methods

nodeIndices<-
signature(x = "dg.FactorVertex"): ...
nodeIndices
signature(object = "dg.FactorVertex"): ...
index<-
signature(x = "dg.FactorVertex"): ...
index
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

vertices <- returnVertexList(paste("V", 1:4, sep = ""), 
                             types = rep("Discrete", 4))
factor <- newFactor(c(1, 2, 3), new("dg.VertexList", vertices[1:3]),
                    type = "Generator")

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)

[Package dynamicGraph version 0.1.7.0 Index]