GUDHI / gudhi-devel

The GUDHI library is a generic open source C++ library, with a Python interface, for Topological Data Analysis (TDA) and Higher Dimensional Geometry Understanding.
https://gudhi.inria.fr/
MIT License
254 stars 65 forks source link

Guard fix for stable simplex handles #951

Closed hschreiber closed 1 year ago

hschreiber commented 1 year ago

A reserve which needs a guard if constexpr (!Options::stable_simplex_handles) was missed in the merged pull request about stable simplex handles.

mglisse commented 1 year ago

I guess it was missed because it isn't instantiated in the testsuite. Maybe add some minimal testing, so at least the function gets compiled once with stable_simplex_handles?

hschreiber commented 1 year ago

I guess it was missed because it isn't instantiated in the testsuite. Maybe add some minimal testing, so at least the function gets compiled once with stable_simplex_handles?

I added the use of a stable simplex tree in the unit test. Doing that I found another bug, but from the link_by_node option this time. Multi edges where added several times in the link structure, so at the destruction of the container, after deleting the first copy of the iterator, the second copy threw a memory access error.