summaryrefslogtreecommitdiff
path: root/src/Witness_complex/include/gudhi/Construct_closest_landmark_table.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/Witness_complex/include/gudhi/Construct_closest_landmark_table.h')
-rw-r--r--src/Witness_complex/include/gudhi/Construct_closest_landmark_table.h6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/Witness_complex/include/gudhi/Construct_closest_landmark_table.h b/src/Witness_complex/include/gudhi/Construct_closest_landmark_table.h
index ef711c34..ec93ae71 100644
--- a/src/Witness_complex/include/gudhi/Construct_closest_landmark_table.h
+++ b/src/Witness_complex/include/gudhi/Construct_closest_landmark_table.h
@@ -51,7 +51,8 @@ namespace witness_complex {
* Closest_landmark_range needs to have push_back operation.
*/
- template <typename WitnessContainer,
+ template <typename FiltrationValue,
+ typename WitnessContainer,
typename LandmarkContainer,
typename KNearestNeighbours>
void construct_closest_landmark_table(WitnessContainer const &points,
@@ -72,7 +73,8 @@ 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], *landmarks_it), landmarks_i);
+ dist_i dist = std::make_pair(euclidean_distance<FiltrationValue>(points[points_i], *landmarks_it),
+ landmarks_i);
l_heap.push(dist);
}
for (int i = 0; i < dim + 1; i++) {