Learn R Programming

HyperG (version 1.0.0)

is.simple: Is a hypergraph simple/linear?

Description

Tests whether a hypergraph is simple or linear.

Usage

is.simple(h)
is.linear(h)

Arguments

h

a hypergraph. Can be a graph for is.simple, in which case the igraph version is called.

Value

a logical.

Details

A hypergraph is simple if all it's edges are distinct, non-empty, and if edge i is contained in edge j, then i=j. A hypergraph is linear if it is simple and the intersection of any two hyper-edges has at most one element.

References

Akram, M., & Luqman, A. (2020). Fuzzy hypergraphs and related extensions. Springer Singapore.

Examples

Run this code
# NOT RUN {
h <- hypergraph_from_edgelist(list(1:4,4:7,c(6,8:10),10:14))
is.linear(h)  ## TRUE
is.simple(h)  ## TRUE
# }

Run the code above in your browser using DataLab