reduce.hypergraph: Remove redundant hyperedges and isolated vertices.

Description Usage Arguments Details Value Author(s) Examples

View source: R/reduce.hypergraph.R

Description

Reduce a hypergraph by removing redundant edges, loops, or isolated vertices.

Usage

1
2
3
4
5
6

Arguments

h

a hypergraph

method

character. See details.

Details

reduce.hypergraph removes redundant edges and/or reduces the hyper-edges: if the method is "inclusion" this removes hyper-edges that are contained in other hyper-edges; if the method is "intersection", it replaces the hypergraph with a new hypergraph whose edges are intersections of the original hypergraph's hyper-edges – each pair of hyper-edges e1 and e2 with a non-empty intersection result in a hyper-edge corresponding to that intersection in the new hypergraph; if the method is "union" it removes edges that are contained in the union of the other edges, reducing to a hypegraph in which every hyper-edge contains at least one vertex which is contained in no other hyper-edge.

Isolates are vertices that are not in any hyper-edges, and loops are hyper-edges containing a single vertex. reduce.hypergraph will remove edges which contain no vertices, since the null set is a subset of any hyper-edge and hence is in the union of all other hyper-edges, so for either method such edges would be removed. simplify.hypergraph removes loops, isolates, and empty hyper-edges from a hypergraph. Isolates are removed after removing loops. This may reduce the order of the hypergraph, unlike the igraph simplify command, which only removes edges.

Value

a hypergraph.

Author(s)

David J. Marchette dmarchette@gmail.com

Examples

1
2
   h <- hypergraph_from_edgelist(list(1:4,1:3,2:4,2:6))
	reduce.hypergraph(h)

HyperG documentation built on March 4, 2021, 5:06 p.m.