summaryrefslogtreecommitdiff
path: root/src/common/include/gudhi/distance_functions.h
diff options
context:
space:
mode:
authorvrouvrea <vrouvrea@636b058d-ea47-450e-bf9e-a15bfbe3eedb>2016-04-08 12:28:04 +0000
committervrouvrea <vrouvrea@636b058d-ea47-450e-bf9e-a15bfbe3eedb>2016-04-08 12:28:04 +0000
commit8b26dea17912abc00aee9e13984ef8cbfe076b0f (patch)
tree420adf59e7d1d133c3f8838ca9c82525a57df6d8 /src/common/include/gudhi/distance_functions.h
parent0ca1fbeb35a9a681320186f63a7cf26256ebf05a (diff)
parent635eda52786951558d820b06bb18b9f6d54dc89a (diff)
Merge of Alpha complex feature
git-svn-id: svn+ssh://scm.gforge.inria.fr/svnroot/gudhi/trunk@1108 636b058d-ea47-450e-bf9e-a15bfbe3eedb Former-commit-id: 05bfd7eb76782dd6e5cab03a746cac4aeacb91de
Diffstat (limited to 'src/common/include/gudhi/distance_functions.h')
-rw-r--r--src/common/include/gudhi/distance_functions.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/common/include/gudhi/distance_functions.h b/src/common/include/gudhi/distance_functions.h
index e5c79ded..cd518581 100644
--- a/src/common/include/gudhi/distance_functions.h
+++ b/src/common/include/gudhi/distance_functions.h
@@ -23,6 +23,8 @@
#ifndef DISTANCE_FUNCTIONS_H_
#define DISTANCE_FUNCTIONS_H_
+#include <cmath> // for std::sqrt
+
/* Compute the Euclidean distance between two Points given
* by a range of coordinates. The points are assumed to have
* the same dimension. */
@@ -35,7 +37,7 @@ double euclidean_distance(Point &p1, Point &p2) {
double tmp = *it1 - *it2;
dist += tmp*tmp;
}
- return sqrt(dist);
+ return std::sqrt(dist);
}
#endif // DISTANCE_FUNCTIONS_H_