From 0c8ac71a00cdcfe286b8c0a940cf0b75868b59cc Mon Sep 17 00:00:00 2001 From: glisse Date: Wed, 5 Apr 2017 22:49:42 +0000 Subject: In Kd_tree::remove, test the point index instead of the coordinates. git-svn-id: svn+ssh://scm.gforge.inria.fr/svnroot/gudhi/branches/bottleneck-glisse@2311 636b058d-ea47-450e-bf9e-a15bfbe3eedb Former-commit-id: e8d50867d77eea455c34dc5a89ed9e0f45fbeeb7 --- src/Bottleneck_distance/include/gudhi/Neighbors_finder.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/Bottleneck_distance/include/gudhi/Neighbors_finder.h b/src/Bottleneck_distance/include/gudhi/Neighbors_finder.h index 8553494d..bdc47578 100644 --- a/src/Bottleneck_distance/include/gudhi/Neighbors_finder.h +++ b/src/Bottleneck_distance/include/gudhi/Neighbors_finder.h @@ -149,7 +149,9 @@ inline int Neighbors_finder::pull_near(int u_point_index) { if(!neighbor) return null_point_index(); tmp = neighbor->point_index; - kd_t.remove(g.get_v_point(tmp)); + auto point = g.get_v_point(tmp); + int idx = point.point_index; + kd_t.remove(point, [idx](Internal_point const&p){return p.point_index == idx;}); } return tmp; } -- cgit v1.2.3