From 2ca42207529f0f21c2cb1392ebfd2b5f41882b60 Mon Sep 17 00:00:00 2001 From: Marc Glisse Date: Tue, 20 Apr 2021 22:39:41 +0200 Subject: Vertex_handle -> size_t --- src/Rips_complex/include/gudhi/Sparse_rips_complex.h | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'src/Rips_complex') diff --git a/src/Rips_complex/include/gudhi/Sparse_rips_complex.h b/src/Rips_complex/include/gudhi/Sparse_rips_complex.h index 9c5993c5..8024f92d 100644 --- a/src/Rips_complex/include/gudhi/Sparse_rips_complex.h +++ b/src/Rips_complex/include/gudhi/Sparse_rips_complex.h @@ -164,10 +164,10 @@ class Sparse_rips_complex { complex.expansion(dim_max); return; } - const Vertex_handle n = num_vertices(graph_); + const std::size_t n = num_vertices(graph_); std::vector lambda(max_v + 1); // lambda[original_order]=params[sorted_order] - for(Vertex_handle i=0;i void compute_sparse_graph(Distance& dist, double const epsilon, Filtration_value const mini, Filtration_value const maxi) { const auto& points = sorted_points; // convenience alias - Vertex_handle n = boost::size(points); + std::size_t n = boost::size(points); double cst = epsilon * (1 - epsilon) / 2; max_v = -1; // Useful for the size of the map lambda. - for (Vertex_handle i = 0; i < n; ++i) { + for (std::size_t i = 0; i < n; ++i) { if ((params[i] < mini || params[i] <= 0) && i != 0) break; // The parameter of the first point is not very meaningful, it is supposed to be infinite, // but if the type does not support it... @@ -203,13 +203,13 @@ class Sparse_rips_complex { // TODO(MG): // - make it parallel // - only test near-enough neighbors - for (Vertex_handle i = 0; i < n; ++i) { + for (std::size_t i = 0; i < n; ++i) { auto&& pi = points[i]; auto li = params[i]; // If we inserted all the points, points with multiplicity would get connected to their first representative, // no need to handle the redundant ones in the outer loop. // if (li <= 0 && i != 0) break; - for (Vertex_handle j = i + 1; j < n; ++j) { + for (std::size_t j = i + 1; j < n; ++j) { auto&& pj = points[j]; auto d = dist(pi, pj); auto lj = params[j]; -- cgit v1.2.3