summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorvrouvrea <vrouvrea@636b058d-ea47-450e-bf9e-a15bfbe3eedb>2017-09-27 20:10:05 +0000
committervrouvrea <vrouvrea@636b058d-ea47-450e-bf9e-a15bfbe3eedb>2017-09-27 20:10:05 +0000
commit914398be0187ab7d21ef1100533ed7a3c7983c76 (patch)
tree116c2ee5577d495b6cbe82ca45e84d0a5ed6c2fb
parent3534c24fd805f8cf0ed8f1d5faea183513966b9f (diff)
Replace INFINITY with std::numeric_limits<Filtration_value>::infinity()
git-svn-id: svn+ssh://scm.gforge.inria.fr/svnroot/gudhi/branches/ST_remove_useless_global_filtration@2719 636b058d-ea47-450e-bf9e-a15bfbe3eedb Former-commit-id: b24d3381da60cd634142e3024d5f5ed53294f8e8
-rw-r--r--src/Hasse_complex/include/gudhi/Hasse_complex.h3
-rw-r--r--src/Simplex_tree/include/gudhi/Simplex_tree.h4
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();
}
}