SimplexTree.collapse

SimplexTree.SimplexTree.collapse(sigma, tau)

Performs an elementary collapse on two given simplices.

Checks whether its possible to collapse \sigma through \tau, and if so, both simplices are removed. A simplex \sigma is said to be collapsible through one of its faces \tau if \sigma is the only coface of \tau (excluding \tau itself).

Parameters

Name Type Description Default
sigma Collection maximal simplex to collapse required
tau Collection face of sigma to collapse required

Returns

Name Type Description
bool whether the pair was collapsed

Examples

from simplextree import SimplexTree
st = SimplexTree([[0,1,2]])
print(st)
Simplex Tree with (3, 3, 1) (0, 1, 2)-simplices
st.collapse([0,1,2], [1,2])
print(st)
Simplex Tree with (3, 2) (0, 1)-simplices