newBlockEdge {dynamicGraph}R Documentation

The block edge object

Description

Returns an object of the class BlockEdgeProto for an edge between blocks or between a block and a vertex.

Usage

newBlockEdge(node.indices, nodes = NULL, width = 2,
             color = "DarkOliveGreen", oriented = TRUE, 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 block edge. If the index is positiv then the node is a vertex, else it is a block.
nodes List with the nodes of the block edge. Used for setting the default label.
width Numeric for the width of the block edge.
color Text string with the color of the block edge.
oriented Logical. If TRUE then the block edge is oriented.
type Text string with the type of the block edge.
label Text string with the label of the block edge.

Details

The function is used in returnBlockEdgeList. dynamicGraphMain will automatic update block edges when vertices are moved between blocks.

Value

A object of class BlockEdgeProto.

Note

The methods of EdgeProto also applies for BlockEdgeProto.

Author(s)

Jens Henrik Badsberg

See Also

newVertexEdge

Examples

 
vertices <- returnVertexList(paste("V", 1:4, sep = ""))
block <- newBlock(stratum = 1)
blockedge <- newBlockEdge(c(4, -1), list(vertices[[1]], block))

str(blockedge)

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

color(blockedge) <- "Black"
label(blockedge) <- "V1~1"
labelPosition(blockedge) <- c(0, 1, 2)
width(blockedge) <- 1
nodeIndicesOfEdge(blockedge) <- c(1, -1)

str(blockedge)

[Package Contents]