gudhi-devel
gudhi-devel copied to clipboard
[Cubical] Add possibility of cubical complex construction from given vertices (top_dimensional_cells like)
Fix #572 Fix #593 Fix #638
The file Bitmap_cubical_complex/include/gudhi/Bitmap_cubical_complex/counter.h
doesn't seem to be used anywhere. Should we remove it completely or leave it for maybe a further use?
The file
Bitmap_cubical_complex/include/gudhi/Bitmap_cubical_complex/counter.h
doesn't seem to be used anywhere. Should we remove it completely or leave it for maybe a further use?
Hmm, true. It does appear in the doc https://gudhi.inria.fr/doc/latest/class_gudhi_1_1cubical__complex_1_1counter.html but I think you have to look quite hard to find it. It looks like it is used a bit in https://github.com/GUDHI/branches/tree/topological_inference_with_cubical_complexes.
I think removing it would be fine. If we ever resurrect that branch we can restore this file at the same time. On the other hand, this file is nicely hidden in its subdirectory, so we could also keep it in case of doubt. @VincentRouvreau , an opinion?
Hmm, true. It does appear in the doc https://gudhi.inria.fr/doc/latest/class_gudhi_1_1cubical__complex_1_1counter.html but I think you have to look quite hard to find it. It looks like it is used a bit in https://github.com/GUDHI/branches/tree/topological_inference_with_cubical_complexes.
I had forgotten this branch...
I think removing it would be fine. If we ever resurrect that branch we can restore this file at the same time. On the other hand, this file is nicely hidden in its subdirectory, so we could also keep it in case of doubt. @VincentRouvreau , an opinion?
I think we can remove it. Dead code can be disturbing.
The output of the benchmark:
Cubical complex creation from 100 000 top cells in 1D: 0.014s
Cubical complex creation from 100 000 vertices in 1D: 0.019s
Cubical complex creation from 100 000 top cells in 5D: 0.522s
Cubical complex creation from 161 051 vertices (equivalent to 100 000 top cells) in 5D: 0.794s
Things now seem to work. To get there, I duplicated quite a bit of code between the periodic and non-periodic cases. I should still take a look to see what the C++ doc looks like after this. And I haven't finished reviewing some pieces of the PR. I don't feel like spending a lot of time cleaning up this implementation. Several pieces of the cubical complex are more in need of a rewrite than a clean-up, which I may or may not do in the future. But for now, getting the functionality in seems useful.