Description Usage Arguments Details Examples
This function allows one to 'reorder' or 'reindex' vertex ids.
1 | reindex(st, ids)
|
st |
a simplex tree. |
ids |
vector of new vertex ids. See details. |
The ids
parameter must be a sorted integer vector of new ids with length matching the
number of vertices. The simplex tree is modified to replace the vertex label at index i
with
ids
[i]. See examples.
1 2 3 4 5 6 7 8 9 | st <- simplex_tree()
st %>% insert(1:3) %>% print_simplices("tree")
# 1 (h = 2): .( 2 3 )..( 3 )
# 2 (h = 1): .( 3 )
# 3 (h = 0):
st %>% reindex(4:6) %>% print_simplices("tree")
# 4 (h = 2): .( 5 6 )..( 6 )
# 5 (h = 1): .( 6 )
# 6 (h = 0):
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.