hypergraph (version 1.44.0)

Hyperedge-class: Class Hyperedge

Description

A Hyperedge object represents a hyperedge in a hypergraph, that is, a subset of the nodes of a hypergraph.

Arguments

Objects from the Class

Objects can be created by calls of the form new("Hyperedge", nodes, label). You can also use the convenience function Hyperedge to create instances. This is especially useful for creating a list of Hyperedge instances using lapply.

Slots

head:
A vector of mode "character" containing the node labels that are a part of the hyperedge
label:
An arbitrary "character" string describing this hyperedge

Methods

initialize
signature(.Object = "Hyperedge"): Create an instance
label
signature(object = "Hyperedge"): Return the value of the label slot
label<-
signature(object = "Hyperedge", value = "character"): Set the label slot.
nodes
signature(object = "Hyperedge"): Return a vector containing the nodes in the hyperedge
show
signature(object = "Hyperedge"): Print a textual summary of the hyperedge

See Also

Hyperedge Hypergraph-class DirectedHyperedge-class

Examples

Run this code
nodes <- LETTERS[1:4]
label <- "Simple hyperedge"
## Use the convenience constructor
he <- Hyperedge(nodes, label)

Run the code above in your browser using DataLab