diff options
Diffstat (limited to 'include/gudhi/Tangential_complex.h')
-rw-r--r-- | include/gudhi/Tangential_complex.h | 21 |
1 files changed, 8 insertions, 13 deletions
diff --git a/include/gudhi/Tangential_complex.h b/include/gudhi/Tangential_complex.h index cfc82eb1..a5cefd6a 100644 --- a/include/gudhi/Tangential_complex.h +++ b/include/gudhi/Tangential_complex.h @@ -1059,7 +1059,6 @@ class Tangential_complex { Triangulation &triangulation, bool verbose = false) { int tangent_space_dim = tsb.dimension(); const Tr_traits &local_tr_traits = triangulation.geom_traits(); - Tr_vertex_handle center_vertex; // Kernel functor & objects typename K::Squared_distance_d k_sqdist = m_k.squared_distance_d_object(); @@ -1084,7 +1083,7 @@ class Tangential_complex { proj_wp = project_point_and_compute_weight(wp, tsb, local_tr_traits); } - center_vertex = triangulation.insert(proj_wp); + Tr_vertex_handle center_vertex = triangulation.insert(proj_wp); center_vertex->data() = i; if (verbose) std::cerr << "* Inserted point #" << i << "\n"; @@ -1094,8 +1093,8 @@ class Tangential_complex { std::size_t num_inserted_points = 1; #endif // const int NUM_NEIGHBORS = 150; - // KNS_range ins_range = m_points_ds.query_k_nearest_neighbors(center_pt, NUM_NEIGHBORS); - INS_range ins_range = m_points_ds.query_incremental_nearest_neighbors(center_pt); + // KNS_range ins_range = m_points_ds.k_nearest_neighbors(center_pt, NUM_NEIGHBORS); + INS_range ins_range = m_points_ds.incremental_nearest_neighbors(center_pt); // While building the local triangulation, we keep the radius // of the sphere "star sphere" centered at "center_vertex" @@ -1204,7 +1203,7 @@ class Tangential_complex { Point center_point = compute_perturbed_point(i); // Among updated point, what is the closer from our center point? std::size_t closest_pt_index = - updated_pts_ds.query_k_nearest_neighbors(center_point, 1, false).begin()->first; + updated_pts_ds.k_nearest_neighbors(center_point, 1, false).begin()->first; typename K::Construct_weighted_point_d k_constr_wp = m_k.construct_weighted_point_d_object(); @@ -1316,11 +1315,10 @@ class Tangential_complex { m_k.compute_coordinate_d_object(); #ifdef GUDHI_TC_USE_ANOTHER_POINT_SET_FOR_TANGENT_SPACE_ESTIM - KNS_range kns_range = m_points_ds_for_tse.query_k_nearest_neighbors( - p, num_pts_for_pca, false); + KNS_range kns_range = m_points_ds_for_tse.k_nearest_neighbors(p, num_pts_for_pca, false); const Points &points_for_pca = m_points_for_tse; #else - KNS_range kns_range = m_points_ds.query_k_nearest_neighbors(p, num_pts_for_pca, false); + KNS_range kns_range = m_points_ds.k_nearest_neighbors(p, num_pts_for_pca, false); const Points &points_for_pca = m_points; #endif @@ -1414,11 +1412,10 @@ class Tangential_complex { const Point &p = m_points[*it_index]; #ifdef GUDHI_TC_USE_ANOTHER_POINT_SET_FOR_TANGENT_SPACE_ESTIM - KNS_range kns_range = m_points_ds_for_tse.query_k_nearest_neighbors( - p, num_pts_for_pca, false); + KNS_range kns_range = m_points_ds_for_tse.k_nearest_neighbors(p, num_pts_for_pca, false); const Points &points_for_pca = m_points_for_tse; #else - KNS_range kns_range = m_points_ds.query_k_nearest_neighbors(p, num_pts_for_pca, false); + KNS_range kns_range = m_points_ds.k_nearest_neighbors(p, num_pts_for_pca, false); const Points &points_for_pca = m_points; #endif @@ -1823,7 +1820,6 @@ class Tangential_complex { bool is_inconsistent = false; Star const& star = m_stars[tr_index]; - Tr_vertex_handle center_vh = m_triangulations[tr_index].center_vertex(); // For each incident simplex Star::const_iterator it_inc_simplex = star.begin(); @@ -1950,7 +1946,6 @@ class Tangential_complex { bool is_star_inconsistent = false; Triangulation const& tr = it_tr->tr(); - Tr_vertex_handle center_vh = it_tr->center_vertex(); if (tr.current_dimension() < m_intrinsic_dim) continue; |