newFactorEdge {dynamicGraph}R Documentation

The factor edge object

Description

Returns an object of the class FactorEdgeProto for an edge from a vertex to a factor node in the bipartite graph.

Usage

newFactorEdge(node.indices, nodes = NULL, width = 2,
              color = "DarkOliveGreen", type = NULL,
              label = ifelse(is.null(nodes), "",
                             paste(Labels(nodes), collapse = "~")))

Arguments

node.indices Vector with abs(node.indices) the indices of the nodes of the factor edge. If the index is positiv then the node is a vertex, else it is the factor vertex.
nodes List with the nodes of the factor edge. Used for setting the default label.
width Numeric for the width of the factor edge.
color Text string with the color of the factor edge.
type Text string with the type of the factor edge.
label Text string with the label of the factor edge.

Value

A object of class FactorEdgeProto.

Note

The methods (except oriented) of EdgeProto also applies for FactorEdgeProto.

Author(s)

Jens Henrik Badsberg

See Also

newVertexEdge

Examples

vertices <- returnVertexList(paste("V", 1:4, sep = ""))
factor <- newFactor(1:3, vertices[1:3], type = "Generator")
factoredge <- newFactorEdge(c(1, -1), list(vertices[[1]], factor))
str(factoredge)

color(factoredge)
label(factoredge)
labelPosition(factoredge)
width(factoredge)
nodeIndicesOfEdge(factoredge)
nodeTypesOfEdge(factoredge)

color(factoredge) <- "Black"
label(factoredge) <- "V1~V1:2:3"
labelPosition(factoredge) <- c(0, 1, 2)
width(factoredge) <- 1
nodeIndicesOfEdge(factoredge) <- c(1, -1)
str(factoredge)

[Package Contents]