is_tree: Checks if the simplicial complex is a tree.

Description Usage Arguments Examples

View source: R/simplex_tree.R

Description

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

Usage

1
is_tree(st)

Arguments

st

a simplex tree.

Examples

1
2
3
4
5
st <- simplex_tree()
st %>% insert(list(1:2, 2:3))
st %>% is_tree() # true
st %>% insert(c(1, 3))
st %>% is_tree() # false

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