RagraphBPH-class: Class "RagraphBPH"

Description Objects from the Class Slots Methods Author(s) See Also Examples

Description

The purpose of this class is to represent a laid out version of a graphBPH object. The laying out is performed by the Rgraphviz package. This is an intermediate step in the process of drawing a graphBPH object.

Objects from the Class

Objects of this class should be created via the graphLayout() function.

Slots

graph:

Object of class Ragraph. The laid out graph.

allNodes:

Object of class character. The names of all nodes in the graph.

nodes:

Object of class character. Records normal nodes in the graph.

edgeNodes:

Object of class character. Records edge-nodes in the graph.

edgeNodeIO:

Object of class list. Records which edges enter and exit each edge-node.

Methods

plot

signature(x = "RagraphBPH", y = "ANY"): draw a representation of the hypergraph where edges between normal nodes in the graph pass through an intermediate edge-node in a nice smooth curve.

edgeDataDefaults<-

signature(self = "RagraphBPH", attr = "character", value = "ANY"): set the default drawing attributes for all edges.

edgeData<-

signature(self = "RagraphBPH", from = "character", to = "character", attr = "character", value = "ANY"): set a specific drawing attribute for one or more edges.

nodeDataDefaults<-

signature(self = "RagraphBPH", attr = "character", value = "ANY"): set the default drawing attributes for all nodes.

nodeData<-

signature(self = "RagraphBPH", n = "character", attr = "character", value = "ANY"): set a specific attribute for one or more nodes.

graphDataDefaults<-

signature(self = "RagraphBPH", attr = "character", value = "ANY"): set the default drawing attributes for the graph.

graphData<-

signature(self = "RagraphBPH", n = "character", attr = "character", value = "ANY"): set a specific attribute for the graph.

Author(s)

Paul Murrell

See Also

graphLayout, graphBPH, and Ragraph

Examples

 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
nodes <- c(LETTERS[1:5], paste("R", 1:3, sep=""))
testgnel <- new("graphNEL",
                nodes=nodes,
                edgeL=list(
                  A=list(edges=c("R1", "R2")),
                  B=list(edges="R2"),
                  C=list(),
                  D=list(edges="R3"),
                  E=list(),
                  R1=list(edges="B"),
                  R2=list(edges=c("C", "D")),
                  R3=list(edges="E")),
                edgemode="directed")
testbph <- graphBPH(testgnel, "^R")
testrabph <- graphLayout(testbph)
edgeDataDefaults(testrabph, "lwd") <- 1
edgeData(testrabph, c("A", "R1"), c("R1", "B"), "lwd") <- c("3", 5)
edgeDataDefaults(testrabph, "color") <- "black"
edgeData(testrabph, c("A", "R1"), c("R1", "B"), "color") <- "red"
nodeDataDefaults(testrabph, "margin") <- 'unit(2, "mm")'
nodeDataDefaults(testrabph, "shape") <- "circle"
plot(testrabph)
graphDataDefaults(testrabph, "arrowLoc") <- "middle"
graphData(testrabph, "arrowLoc") <- "end"
plot(testrabph)
graphData(testrabph, "arrowLoc") <- "none"
plot(testrabph)

hyperdraw documentation built on Nov. 8, 2020, 11:11 p.m.