Description Slots Extends Methods Note Author(s) See Also Examples
A skeleton class for the classes of factor vertices.
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".
Class "dg.Vertex", directly.
Class "dg.Node", directly.
signature(x = "dg.FactorVertex"): ...
signature(object = "dg.FactorVertex"): ...
signature(x = "dg.FactorVertex"): ...
signature(object = "dg.FactorVertex"): ...
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.
signature(x = "dg.FactorVertex"): ...
signature(object = "dg.FactorVertex"): ...
The methods (except stratum) of dg.Vertex
also applies for dg.FactorVertex.
Jens Henrik Badsberg
returnFactorVerticesAndEdges,
dg.FactorEdge-class,
dg.Vertex-class,
dg.Node-class, and
validFactorClasses.
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)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.