diff options
author | vrouvrea <vrouvrea@636b058d-ea47-450e-bf9e-a15bfbe3eedb> | 2016-10-03 15:17:04 +0000 |
---|---|---|
committer | vrouvrea <vrouvrea@636b058d-ea47-450e-bf9e-a15bfbe3eedb> | 2016-10-03 15:17:04 +0000 |
commit | 5ce7c7c8ec1378439cdc02dc94ac2a7e14e9ca04 (patch) | |
tree | e5dab0473590126a3a5864fe7ebc11720c26bd26 /src/Witness_complex | |
parent | 29499b02d1b6eafcc6419a0b6b4469152ea20a09 (diff) |
Fix euclidean distance for rips
git-svn-id: svn+ssh://scm.gforge.inria.fr/svnroot/gudhi/branches/rips_complex_module@1610 636b058d-ea47-450e-bf9e-a15bfbe3eedb
Former-commit-id: a07dfd4ffe3f17bf242ffb5b57058e99171a8016
Diffstat (limited to 'src/Witness_complex')
-rw-r--r-- | src/Witness_complex/include/gudhi/Landmark_choice_by_furthest_point.h | 2 | ||||
-rw-r--r-- | src/Witness_complex/include/gudhi/Landmark_choice_by_random_point.h | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/src/Witness_complex/include/gudhi/Landmark_choice_by_furthest_point.h b/src/Witness_complex/include/gudhi/Landmark_choice_by_furthest_point.h index df93155b..bcb89e00 100644 --- a/src/Witness_complex/include/gudhi/Landmark_choice_by_furthest_point.h +++ b/src/Witness_complex/include/gudhi/Landmark_choice_by_furthest_point.h @@ -77,7 +77,7 @@ namespace witness_complex { chosen_landmarks.push_back(curr_max_w); unsigned i = 0; for (auto& p : points) { - double curr_dist = euclidean_distance(p, *(std::begin(points) + chosen_landmarks[current_number_of_landmarks])); + double curr_dist = euclidean_distance<double>(p, *(std::begin(points) + chosen_landmarks[current_number_of_landmarks])); wit_land_dist[i].push_back(curr_dist); knn[i].push_back(current_number_of_landmarks); if (curr_dist < dist_to_L[i]) diff --git a/src/Witness_complex/include/gudhi/Landmark_choice_by_random_point.h b/src/Witness_complex/include/gudhi/Landmark_choice_by_random_point.h index ebf6aad1..b5aab9d5 100644 --- a/src/Witness_complex/include/gudhi/Landmark_choice_by_random_point.h +++ b/src/Witness_complex/include/gudhi/Landmark_choice_by_random_point.h @@ -78,7 +78,7 @@ namespace witness_complex { int landmarks_i = 0; for (landmarks_it = landmarks.begin(), landmarks_i = 0; landmarks_it != landmarks.end(); ++landmarks_it, landmarks_i++) { - dist_i dist = std::make_pair(euclidean_distance(points[points_i], points[*landmarks_it]), landmarks_i); + dist_i dist = std::make_pair(euclidean_distance<double>(points[points_i], points[*landmarks_it]), landmarks_i); l_heap.push(dist); } for (int i = 0; i < dim + 1; i++) { |