35 template<
typename Po
int >
36 typename std::iterator_traits<typename boost::range_iterator<Point>::type>::value_type
37 operator()(
const Point& p1,
const Point& p2)
const {
38 auto it1 = std::begin(p1);
39 auto it2 = std::begin(p2);
40 typedef typename boost::range_value<Point>::type NT;
42 for (; it1 != std::end(p1); ++it1, ++it2) {
43 GUDHI_CHECK(it2 != std::end(p2),
"inconsistent point dimensions");
47 GUDHI_CHECK(it2 == std::end(p2),
"inconsistent point dimensions");
51 template<
typename T >
52 T operator() (
const std::pair< T, T >& f,
const std::pair< T, T >& s)
const {
53 T dx = f.first - s.first;
54 T dy = f.second - s.second;
56 return sqrt(dx*dx + dy*dy);