dg.FactorEdge-class {dynamicGraph}R Documentation

Class "dg.FactorEdge"

Description

The class for the bipartite graph edges between vertices and factors.

Usage

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

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.
dash Text string for the dash pattern of the edge.

Slots

vertex.indices:
Object of class "numeric", see "dg.Edge".
width:
Object of class "numeric", see "dg.Edge".
dash:
Object of class "character", see "dg.Edge".
color:
Object of class "character", see "dg.Edge".
label:
Object of class "character", see "dg.Edge".
label.position:
Object of class "numeric", see "dg.Edge".

Extends

Class "dg.Edge", directly. Class "dg.Node", by class "dg.Edge".

Methods

nodeTypesOfEdge
signature(object = "dg.FactorEdge"): Extract the types ("super classes": "Vertex" or "Factor") of the vertices (nodes) of the edge.

Note

The methods (except oriented) of dg.Edge also applies for dg.FactorEdge.

Author(s)

Jens Henrik Badsberg

See Also

returnFactorEdgeList, dg.Edge-class, and dg.FactorVertex-class.

Examples

vertices <- returnVertexList(paste("V", 1:4, sep = ""))
factor <- newFactor(1:3, new("dg.VertexList", vertices[1:3]),
                    type = "Generator")
factoredge <- newFactorEdge(c(1, -1), 
                            new("dg.VertexList", 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 dynamicGraph version 0.1.7.0 Index]