From 68443280388d3a83adc3f927b3252b2debafb11c Mon Sep 17 00:00:00 2001 From: fgodi Date: Wed, 23 May 2018 12:49:36 +0000 Subject: strange git-svn-id: svn+ssh://scm.gforge.inria.fr/svnroot/gudhi/branches/toplex_map@3454 636b058d-ea47-450e-bf9e-a15bfbe3eedb Former-commit-id: 9860c0af5c014faeb5d16b81e1fafa8a4eb27786 --- src/Toplex_map/include/gudhi/Lazy_Toplex_map.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/Toplex_map') diff --git a/src/Toplex_map/include/gudhi/Lazy_Toplex_map.h b/src/Toplex_map/include/gudhi/Lazy_Toplex_map.h index 396961fe..31f3da4b 100644 --- a/src/Toplex_map/include/gudhi/Lazy_Toplex_map.h +++ b/src/Toplex_map/include/gudhi/Lazy_Toplex_map.h @@ -175,7 +175,7 @@ inline void Lazy_Toplex_map::erase_max(const Input_vertex_range &vertex_range){ Simplex sigma(vertex_range.begin(),vertex_range.end()); empty_toplex = false; Simplex_ptr sptr = std::make_shared(sigma); - bool erased; + bool erased=false; for(const Vertex& v : sigma){ erased = t0.at(v).erase(sptr) > 0; if(t0.at(v).size()==0) @@ -206,17 +206,17 @@ std::size_t Lazy_Toplex_map::get_gamma0_lbound(const Vertex v) const{ void Lazy_Toplex_map::clean(const Vertex v){ Toplex_map toplices; std::unordered_map> dsorted_simplices; - int max_dim = 0; + std::size_t max_dim = 0; for(const Simplex_ptr& sptr : Simplex_ptr_set(t0.at(v))){ if(sptr->size() > max_dim){ - for(int d = max_dim+1; d<=sptr->size(); d++) + for(std::size_t d = max_dim+1; d<=sptr->size(); d++) dsorted_simplices.emplace(d, std::vector()); max_dim = sptr->size(); } dsorted_simplices[sptr->size()].emplace_back(*sptr); erase_max(*sptr); } - for(int d = max_dim; d>=1; d--) + for(std::size_t d = max_dim; d>=1; d--) for(const Simplex &s : dsorted_simplices.at(d)) if(!toplices.membership(s)) toplices.insert_independent_simplex(s); -- cgit v1.2.3