simplextree (version 1.0.1)

is_tree: Checks if the simplicial complex is a tree.

Description

This function performs a breadth-first search on the simplicial complex, checking if the complex is acyclic.

Usage

is_tree(st)

Arguments

st

a simplex tree.

Examples

Run this code
# NOT RUN {
st <- simplex_tree()
st %>% insert(list(1:2, 2:3))
st %>% is_tree() # true
st %>% insert(c(1, 3))
st %>% is_tree() # false
# }

Run the code above in your browser using DataLab