| Hypergraph-class {hypergraph} | R Documentation |
A hypergraph consists of a set of nodes and a set of hyperedges. Each hyperedge is a subset of the node set. This class provides a representation of a hypergraph that is (hopefully) useful for computing.
Objects can be created by calls of the form new("Hypergraph", nodes, hyperedges).
You can also use the convenience function Hypergraph. The
nodes argument should be a character vector of distinct labels
representing the nodes of the hypergraph. The hyperedges
argument must be a list of Hyperedge-class objects.
nodes:A "character" vector specifying the nodes
hyperedges:A "list" of
Hyperedge-class objects
signature(.Object = "Hypergraph"): Return
the list of Hyperedge objects
signature(.Object = "Hypergraph"): Return
a character vector of labels for the Hyperedge objects in the
hypergraph.
signature(.Object = "Hypergraph"): Return the
incidence matrix representation of this hypergraph
signature(.Object = "matrix"): Return the
hypergraph representation of this incidence matrix
signature(.Object = "Hypergraph"): Create
an instance
signature(object = "Hypergraph"): Return the
vector of nodes (character vector)
signature(object = "Hypergraph"): Return the
number of nodes in the hypergraph
signature(.Object = "Hypergraph"): Return
the graphNEL representation of the hypergraph (a bipartite
graph)
Seth Falcon
Hyperedge-class
DirectedHyperedge-class
graphNEL-class
nodes <- LETTERS[1:4]
hEdges <- lapply(list("A", LETTERS[1:2], LETTERS[3:4]), "Hyperedge")
hg <- new("Hypergraph", nodes=nodes, hyperedges=hEdges)