23 #ifndef DISTANCE_FUNCTIONS_H_ 24 #define DISTANCE_FUNCTIONS_H_ 27 #include <type_traits> 40 template<
typename Po
int >
41 auto operator()(
const Point& p1,
const Point& p2)
const ->
typename std::decay<decltype(*std::begin(p1))>::type {
42 auto it1 = p1.begin();
43 auto it2 = p2.begin();
44 typename Point::value_type dist = 0.;
45 for (; it1 != p1.end(); ++it1, ++it2) {
46 typename Point::value_type tmp = (*it1) - (*it2);
49 return std::sqrt(dist);
55 #endif // DISTANCE_FUNCTIONS_H_ Compute the Euclidean distance between two Points given by a range of coordinates. The points are assumed to have the same dimension.
Definition: distance_functions.h:38
Definition: SimplicialComplexForAlpha.h:26