Hypergraph-class {hypergraph}R Documentation

Class Hypergraph

Description

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 from the Class

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.

Slots

nodes:
A "character" vector specifying the nodes
hyperedges:
A "list" of Hyperedge-class objects

Methods

hyperedges
signature(.Object = "Hypergraph"): Return the list of Hyperedge objects
hyperedgeLabels
signature(.Object = "Hypergraph"): Return a character vector of labels for the Hyperedge objects in the hypergraph.
inciMat
signature(.Object = "Hypergraph"): Return the incidence matrix representation of this hypergraph
initialize
signature(.Object = "Hypergraph"): Create an instance
nodes
signature(object = "Hypergraph"): Return the vector of nodes (character vector)
numNodes
signature(object = "Hypergraph"): Return the number of nodes in the hypergraph
toGraphNEL
signature(.Object = "Hypergraph"): Return the graphNEL representation of the hypergraph (a bipartite graph)

Author(s)

Seth Falcon

See Also

Hyperedge-class DirectedHyperedge-class graphNEL-class

Examples

nodes <- LETTERS[1:4]
hEdges <- lapply(list("A", LETTERS[1:2], LETTERS[3:4]), "Hyperedge")
hg <- new("Hypergraph", nodes=nodes, hyperedges=hEdges)

[Package hypergraph version 1.4.0 Index]