diff options
author | ROUVREAU Vincent <vincent.rouvreau@inria.fr> | 2020-03-03 16:30:22 +0100 |
---|---|---|
committer | ROUVREAU Vincent <vincent.rouvreau@inria.fr> | 2020-03-03 16:31:19 +0100 |
commit | 73194242e1c8012c1320a7581a382a3b2b59eb09 (patch) | |
tree | 280f7ce45664bc25bdbc0b12bb95cc28b058bb9f | |
parent | d2943b9e7311c8a3d8a4fb379c39b15497481b9c (diff) |
Fix #172 and add a proper comment on the modification
-rw-r--r-- | src/Simplex_tree/include/gudhi/Simplex_tree.h | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/Simplex_tree/include/gudhi/Simplex_tree.h b/src/Simplex_tree/include/gudhi/Simplex_tree.h index 76608008..5110819f 100644 --- a/src/Simplex_tree/include/gudhi/Simplex_tree.h +++ b/src/Simplex_tree/include/gudhi/Simplex_tree.h @@ -1347,7 +1347,9 @@ class Simplex_tree { }); Filtration_value max_filt_border_value = filtration(*max_border); - if (simplex.second.filtration() < max_filt_border_value) { + // Replacing if(f<max) with if(!(f>=max)) would mean that if f is NaN, we replace it with the max of the children. + // That seems more useful than keeping NaN. + if (!(simplex.second.filtration() >= max_filt_border_value)) { // Store the filtration modification information modified = true; simplex.second.assign_filtration(max_filt_border_value); |