Learn R Programming

hypergraph (version 1.44.0)

DirectedHyperedge-class: Class DirectedHyperedge

Description

This class represents directed hyperedges in a Hypergraph-class. A directed hyperedge consists of two disjount sets of nodes, those in the tail and those in the head of the hyperedge. Directed hyperedges are sometimes called hyperarcs.

Arguments

Objects from the Class

Objects can be created by calls of the form new("DirectedHyperedge", head, tail, label). You can also use the convenience function DirectedHyperedge.

Slots

tail:
Character vector of nodes in the tail of the hyperedge
head:
Character vector of nodes in the head of the hyperege
label:
Character string describing the directed hyperedge

Extends

Class "Hyperedge", directly.

Methods

head
signature(x = "DirectedHyperedge"): Return a vector containing the nodes in the head of the hyperedge
tail
signature(x = "DirectedHyperedge"): Return a vector containing the nodes in the tail of the hyperedge
initialize
signature(.Object = "DirectedHyperedge"): Create a new instance.
nodes
signature(object = "DirectedHyperedge"): Return a vector containing all nodes present in the hyperedge.
show
signature(object = "DirectedHyperedge"): Print me
toUndirected
signature(.Object = "DirectedHyperedge"): Return a Hyperedge-class object that results from coercing to an undirected hyperedge.

See Also

DirectedHyperedge Hyperedge Hyperedge-class Hypergraph-class

Examples

Run this code
head <- LETTERS[1:4]
tail <- LETTERS[19:21]
label <- "Directed hyperedge"
dhe <- new("DirectedHyperedge", head=head, tail=tail, label=label)

Run the code above in your browser using DataLab