diff options
author | glisse <glisse@636b058d-ea47-450e-bf9e-a15bfbe3eedb> | 2017-03-28 09:02:15 +0000 |
---|---|---|
committer | glisse <glisse@636b058d-ea47-450e-bf9e-a15bfbe3eedb> | 2017-03-28 09:02:15 +0000 |
commit | 191602559e2616767d052961d48d19ef6f4b5ec8 (patch) | |
tree | ef9104e0adb58c6e59ded1ed4f43c26887e41b9d /src/Bottleneck_distance | |
parent | 672011c337a084daa53ba0772fbd8e7d9a0d0897 (diff) |
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
Diffstat (limited to 'src/Bottleneck_distance')
-rw-r--r-- | src/Bottleneck_distance/include/gudhi/Graph_matching.h | 6 |
1 files changed, 3 insertions, 3 deletions
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<int> tries(unmatched_in_u); + std::vector<int> 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<int> u_vertices(unmatched_in_u); - std::list<int> v_vertices; + std::vector<int> u_vertices(unmatched_in_u.cbegin(), unmatched_in_u.cend()); + std::vector<int> 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); |