diff options
-rw-r--r-- | src/Hasse_complex/include/gudhi/Hasse_complex.h | 3 | ||||
-rw-r--r-- | src/Simplex_tree/include/gudhi/Simplex_tree.h | 4 |
2 files changed, 4 insertions, 3 deletions
diff --git a/src/Hasse_complex/include/gudhi/Hasse_complex.h b/src/Hasse_complex/include/gudhi/Hasse_complex.h index 834201a5..e67f7609 100644 --- a/src/Hasse_complex/include/gudhi/Hasse_complex.h +++ b/src/Hasse_complex/include/gudhi/Hasse_complex.h @@ -30,6 +30,7 @@ #include <algorithm> #include <utility> // for pair #include <vector> +#include <limits> // for infinity value #ifdef GUDHI_USE_TBB #include <tbb/parallel_for.h> @@ -155,7 +156,7 @@ class Hasse_complex { Filtration_value filtration(Simplex_handle sh) { if (sh == null_simplex()) { - return INFINITY; + return std::numeric_limits<Filtration_value>::infinity(); } return complex_[sh].filtration_; } diff --git a/src/Simplex_tree/include/gudhi/Simplex_tree.h b/src/Simplex_tree/include/gudhi/Simplex_tree.h index 8c91cc67..37b3ea97 100644 --- a/src/Simplex_tree/include/gudhi/Simplex_tree.h +++ b/src/Simplex_tree/include/gudhi/Simplex_tree.h @@ -402,14 +402,14 @@ class Simplex_tree { /** \brief Returns the filtration value of a simplex. * - * Called on the null_simplex, returns INFINITY. + * Called on the null_simplex, it returns infinity. * If SimplexTreeOptions::store_filtration is false, returns 0. */ static Filtration_value filtration(Simplex_handle sh) { if (sh != null_simplex()) { return sh->second.filtration(); } else { - return INFINITY; + return std::numeric_limits<Filtration_value>::infinity(); } } |