Closed mglisse closed 5 months ago
After verifying, it seems interesting to use clear method in collapse_edges SimplexTree method. I will propose another PR
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.
https://github.com/GUDHI/gudhi-devel/blob/b85365770cc98c54b72f98f0af2d30efbd35e12c/src/python/gudhi/simplex_tree.pyx#L843-L846
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.