summaryrefslogtreecommitdiff
path: root/src/common/include
diff options
context:
space:
mode:
authortlacombe <lacombe1993@gmail.com>2019-12-16 17:19:44 +0100
committertlacombe <lacombe1993@gmail.com>2019-12-16 17:19:44 +0100
commitefebda596ae5a03dd0f15317ebfe74b5f19c78aa (patch)
treec21581669c5dcc985bed33fd043c0999f4e20e7d /src/common/include
parentaba9ad68394b0c5aae22c450cac7162733132002 (diff)
parent3f1601665cbd0b7397c9c19f55d608246192207b (diff)
Merge branch 'master' into wbary-theo
updating master in wbary-theo
Diffstat (limited to 'src/common/include')
-rw-r--r--src/common/include/gudhi/Unitary_tests_utils.h1
-rw-r--r--src/common/include/gudhi/random_point_generators.h2
-rw-r--r--src/common/include/gudhi/reader_utils.h10
3 files changed, 12 insertions, 1 deletions
diff --git a/src/common/include/gudhi/Unitary_tests_utils.h b/src/common/include/gudhi/Unitary_tests_utils.h
index 4ad4dae8..7d039304 100644
--- a/src/common/include/gudhi/Unitary_tests_utils.h
+++ b/src/common/include/gudhi/Unitary_tests_utils.h
@@ -14,6 +14,7 @@
#include <iostream>
#include <limits> // for std::numeric_limits<>
+#include <cmath> // for std::fabs
template<typename FloatingType >
void GUDHI_TEST_FLOAT_EQUALITY_CHECK(FloatingType a, FloatingType b,
diff --git a/src/common/include/gudhi/random_point_generators.h b/src/common/include/gudhi/random_point_generators.h
index fb69f832..9dd88ac4 100644
--- a/src/common/include/gudhi/random_point_generators.h
+++ b/src/common/include/gudhi/random_point_generators.h
@@ -21,7 +21,7 @@
// Make compilation fail - required for external projects - https://github.com/GUDHI/gudhi-devel/issues/10
#if CGAL_VERSION_NR < 1041101000
-# error Alpha_complex_3d is only available for CGAL >= 4.11
+# error random_point_generators is only available for CGAL >= 4.11
#endif
namespace Gudhi {
diff --git a/src/common/include/gudhi/reader_utils.h b/src/common/include/gudhi/reader_utils.h
index 98335552..db31bf5c 100644
--- a/src/common/include/gudhi/reader_utils.h
+++ b/src/common/include/gudhi/reader_utils.h
@@ -293,6 +293,9 @@ Note: the function does not check that birth <= death.
**/
template <typename OutputIterator>
void read_persistence_intervals_and_dimension(std::string const& filename, OutputIterator out) {
+#ifdef DEBUG_TRACES
+ std::cout << "read_persistence_intervals_and_dimension - " << filename << std::endl;
+#endif // DEBUG_TRACES
std::ifstream in(filename);
if (!in.is_open()) {
std::string error_str("read_persistence_intervals_and_dimension - Unable to open file ");
@@ -307,6 +310,13 @@ void read_persistence_intervals_and_dimension(std::string const& filename, Outpu
if (line.length() != 0 && line[0] != '#') {
double numbers[4];
int n = sscanf(line.c_str(), "%lf %lf %lf %lf", &numbers[0], &numbers[1], &numbers[2], &numbers[3]);
+#ifdef DEBUG_TRACES
+ std::cout << "[" << n << "] = ";
+ for (int i = 0; i < n; i++) {
+ std::cout << numbers[i] << ",";
+ }
+ std::cout << std::endl;
+#endif // DEBUG_TRACES
if (n >= 2) {
int dim = (n >= 3 ? static_cast<int>(numbers[n - 3]) : -1);
*out++ = std::make_tuple(dim, numbers[n - 2], numbers[n - 1]);