Learn R Programming

HyperG (version 1.0.0)

has.isolates: Test for loops, isolates and empty hyper-edges.

Description

Tools to determine whether a hypergraph has degenerate elements such as loops (hyper-edges with a single vertex) isolated vertices (ones which appear in no hyper-edges) and empty hyper-edges.

Usage

has.isolates(h)
has.loops(h)
has.empty.hyperedges(h)

Arguments

h

a hypergraph.

Value

returns a logical.

See Also

remove.isolates, remove.loops, remove.empty.hyperedges. reduce.hypergraph.

Examples

Run this code
# NOT RUN {
   h <- hypergraph_from_edgelist(list(1:3,2:8,9))
	has.loops(h) ## TRUE
	has.isolates(h) ## FALSE
	k <- hypergraph.add.vertices(h,10)
	has.isolates(k) ## TRUE
# }

Run the code above in your browser using DataLab