nerve: nerve

Description Usage Arguments Details

View source: R/nerve.R

Description

Compute the nerve of a given cover.

Usage

1
nerve(st, cover, k = st$dimension, threshold = 1L, neighborhood = NULL)

Arguments

st

a simplex tree.

cover

list of integers indicating set membership. See details.

k

max simplex dimension to consider.

threshold

the number of elements in common for k sets to be considered intersecting. Defaults to 1.

neighborhood

which combinations of sets to check. See details.

Details

This computes the nerve of a given cover, adding a k-simplex for each combination of k+1 sets in the given cover that have at least threshold elements in their common intersection.

If neighborhood is supplied, it can be either 1) a matrix, 2) a list, or 3) a function. Each type parameterizes which sets in the cover need be checked for to see if they have at least threshold elements in their common intersection. If a matrix is supplied, the columns should indicate the indices of the cover to check (e.g if neighborhood = matrix(c(1,2), nrow = 2), then only the first two sets of cover are tested.). Similarly, if a list is supplied, each element in the list should give the indices to test.

The most flexible option is supplying a function to neighborhood. If a function is passed, it's assumed to accept an integer vector of k indices (of the cover) and return a boolean indicating whether or not to test if they have at least threshold elements in their common intersection. This can be used to filter out subsets of the cover the user knows are The indices are generated using the same code that performs expand.


simplextree documentation built on Sept. 13, 2020, 5:06 p.m.