Use the new Simplex_tree.clear function
mglisse opened this issue · 2 comments
mglisse commented
gudhi-devel/src/python/gudhi/simplex_tree.pyx
Lines 843 to 846 in b853657
Would using ptr->clear()
work, now that we have that function? It isn't 100% equivalent, and the vector of vertices keeps its capacity, but I don't think we care about the difference.
I didn't check if there are other places where we delete&recreate a Simplex_tree to clear it.
VincentRouvreau commented
After verifying, it seems interesting to use clear method in collapse_edges SimplexTree method. I will propose another PR
VincentRouvreau commented
I do not see any other places where we delete and recreate a Simplex tree to clear it.
I close it, but do not hesitate to open a new issue if any other places are found.