graphBPH-class {hyperdraw} | R Documentation |
A bipartite representation of a hypergraph. The purpose of this class is to support visualization of the hypergraph; it is not intended for analysis or manipulation of the hypergraph.
Objects can be created by calls of the form new("graphBPH",
graph, edgeNodePattern, ...)
.
There is also a convenience function graphBPH()
.
A graphBPH
object consists of a graphNEL
object, which must obey some strict rules:
nodes in the graph are divided into two sets: normal nodes and edge-nodes,
all edges in the graph must connect a normal node to an edge node,
the graph must be a directed graph.
The edgeNodePattern
is a regular expression that is
used to define the set of edge-nodes.
graph
:Object of class graphNEL
. This graph
must obey the constraints described above.
edgeNodePattern
:Object of class character
.
The regular expression used to define edge-nodes.
nodes
:Object of class character
.
Records which nodes in the graph are normal nodes.
edgeNodes
:Object of class character
.
Records which nodes in the graph are edge-nodes.
edgeNodeIO
:Object of class list
.
Records information about which edges enter and exit
each edge-node.
signature(x = "graphBPH", 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.
signature(graph = "graphBPH",
layoutType = "missing")
:
convert the graphBPH
object to a
RagraphBPH
object (using a default layout method).
signature(graph = "graphBPH",
layoutType = "character")
:
convert the graphBPH
object to a
RagraphBPH
object (using the specified layout method).
Paul Murrell
Gansner, E.R. and and North, S.C. (1999) An open graph visualization system and its applications to software engineering, Software - Practice and Experience, 30:1203–1233.
Gentleman, R. and Whalen, E. and Huber, W. and Falcon, S. graph: A package to handle graph data structures.
Gentry, J. and Long, L. and Gentleman, R. and Falcon, S. and Hahne, F. and Sarkar, D. and Hansen, K. Rgraphviz: Provides plotting capabilities for R graph objects.
agopen
,
graphLayout
and
graphNEL
RagraphBPH
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") plot(testbph) # A Hypergraph equivalent require(hypergraph) dh1 <- DirectedHyperedge("A", "B", "R1") dh2 <- DirectedHyperedge(c("A", "B"), c("C", "D"), "R2") dh3 <- DirectedHyperedge("D", "E", "R3") hg <- Hypergraph(LETTERS[1:5], list(dh1, dh2, dh3)) plot(graphBPH(hg))