Description Usage Arguments Details References Examples
Performs an edge contraction.
1 | contract(st, edge)
|
st |
a simplex tree. |
edge |
an edge to contract, as a 2-length vector. |
This function performs an edge contraction in the sense described by (1), which is
summarized here. Given an edge {va, vb}, vb is contracted to va if vb is
removed from the complex and the link of va is augmented with the link of vb. This may be thought as
applying the mapping:
f(u) = va
if u = vb
and identity otherwise, to all simplices in the complex.
edge
is not sorted prior to contraction: the second vertex of the edge is always contracted to the first.
Note that edge contraction is not symmetric.
1. Boissonnat, Jean-Daniel, and Clement Maria. "The simplex tree: An efficient data structure for general simplicial complexes." Algorithmica 70.3 (2014): 406-427.
1 2 3 4 5 | st <- simplex_tree(1:3)
st %>% print_simplices()
# 1, 2, 3, 1 2, 1 3, 2 3, 1 2 3
st %>% contract(c(1, 3)) %>% print_simplices()
# 1, 2, 1 2
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.