create: Creating simplicial complexes

Description Usage Arguments Value Examples

Description

These functions create 'sc' objects from various input sources.

Usage

1
2
3
4
5
sc_from_data_frame(d, vertices = NULL, reduce = FALSE)

sc_from_list(l, vertices = NULL, reduce = FALSE)

sc_reduce(sc)

Arguments

d

A data frame of vertex-face membership with columns vertex and simplex.

vertices

A character or integer vector of vertex IDs, possibly including more than those included in d or l.

reduce

Whether to iteratively remove simplices that are faces of other simplices.

l

A list of simplices consisting of integer member vertex IDs.

sc

A simplicial complex (an igraph::igraph object prefixed with class 'sc').

Value

A simplicial complex encoded as an igraph::igraph object prefixed with class 'sc'.

Examples

1
2
3
4
5
6
7
8
# a face list with some redundancies
x <- list(a = 1:4, b = 3:5, c = c(3,6), d = 7, e = c(3,6), f = c(3:5, 7))
# creating a simplicial complex removes duplicates
(sc <- sc_from_list(x))
plot(sc)
# further reduction can be done by testing for subset relations among the faces
(rsc <- sc_reduce(sc))
plot(rsc)

corybrunson/sc documentation built on Aug. 27, 2019, 1:12 p.m.