induced_hypergraph {HyperG}R Documentation

Induced hypergraph.

Description

Computes the hypergraph induced by a subset of the vertices.

Usage

induced_hypergraph(h, v, simplify = TRUE)

Arguments

h

a hypergraph.

v

a vector of vertices.

simplify

logical.

Details

First the hypergraph is reduced to only those vertices in v. This results in it retaining only those hyper-edges containing any elements of v, as well as removing from the resultant hyper-edges any vertices not in v. If simplify is true, loops are then removed. This function always removes empty hyper-edges, so any hyper-edge which does not contain any elements of v is removed.

Value

a hypergraph.

Author(s)

David J. Marchette dmarchette@gmail.com

Examples

   h <- hypergraph_from_edgelist(list(1:4,3:7,c(1,3,5)))
	k <- induced_hypergraph(h,c(1,3,5))

[Package HyperG version 1.0.0 Index]