From 191602559e2616767d052961d48d19ef6f4b5ec8 Mon Sep 17 00:00:00 2001 From: glisse Date: Tue, 28 Mar 2017 09:02:15 +0000 Subject: Replace some lists with vectors. git-svn-id: svn+ssh://scm.gforge.inria.fr/svnroot/gudhi/branches/bottleneck-glisse@2261 636b058d-ea47-450e-bf9e-a15bfbe3eedb Former-commit-id: 05dc215157f2a91c0d2150def3392e54af58ad21 --- src/Bottleneck_distance/include/gudhi/Graph_matching.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/Bottleneck_distance/include') diff --git a/src/Bottleneck_distance/include/gudhi/Graph_matching.h b/src/Bottleneck_distance/include/gudhi/Graph_matching.h index 49f90da5..eed3e5ea 100644 --- a/src/Bottleneck_distance/include/gudhi/Graph_matching.h +++ b/src/Bottleneck_distance/include/gudhi/Graph_matching.h @@ -83,7 +83,7 @@ inline bool Graph_matching::multi_augment() { if (max_depth < 0 || (unmatched_in_u.size() > rn && max_depth >= rn)) return false; bool successful = false; - std::list tries(unmatched_in_u); + std::vector tries(unmatched_in_u.cbegin(), unmatched_in_u.cend()); for (auto it = tries.cbegin(); it != tries.cend(); it++) // 'augment' has side-effects which have to be always executed, don't change order successful = augment(layered_nf, *it, max_depth) || successful; @@ -123,8 +123,8 @@ inline bool Graph_matching::augment(Layered_neighbors_finder & layered_nf, int u } inline Layered_neighbors_finder Graph_matching::layering() const { - std::list u_vertices(unmatched_in_u); - std::list v_vertices; + std::vector u_vertices(unmatched_in_u.cbegin(), unmatched_in_u.cend()); + std::vector v_vertices; Neighbors_finder nf(*gp, r); for (int v_point_index = 0; v_point_index < gp->size(); ++v_point_index) nf.add(v_point_index); -- cgit v1.2.3