
Last chance! 50% off unlimited learning
Sale ends in
FactorVertexProto
.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())
vertex.indices
of the vertices of the factor.vertices
of the factor. Used for setting
the default label.name
of the factor vertex.label
of the factor vertex.type
, e.i. the class,
of the factor vertex. Should be in factorClasses
.index
of the factor vertex.width
of the factor vertex.color
of the factor vertex.factorClasses
.FactorVertexProto
.newVertex
, validVertexClasses
vertices <- returnVertexList(paste("V", 1:4, sep = ""),
types = rep("Discrete", 4))
factor <- newFactor(c(1, 2, 3), 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)
Run the code above in your browser using DataLab