From e5a2be33e10b0653258252451330c021fa0bc204 Mon Sep 17 00:00:00 2001 From: fgodi Date: Thu, 26 Oct 2017 15:57:09 +0000 Subject: git-svn-id: svn+ssh://scm.gforge.inria.fr/svnroot/gudhi/branches/toplex_map@2809 636b058d-ea47-450e-bf9e-a15bfbe3eedb Former-commit-id: 67f6ba752b6284763cdc706d5dec3e100386c602 --- src/Toplex_map/include/gudhi/Filtered_toplex_map.h | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'src/Toplex_map') diff --git a/src/Toplex_map/include/gudhi/Filtered_toplex_map.h b/src/Toplex_map/include/gudhi/Filtered_toplex_map.h index 5bf50fc5..3a0064dc 100644 --- a/src/Toplex_map/include/gudhi/Filtered_toplex_map.h +++ b/src/Toplex_map/include/gudhi/Filtered_toplex_map.h @@ -14,7 +14,7 @@ public: typedef double Filtration_value; template - void insert_simplex_and_subfaces(const Input_vertex_range &vertex_range, Filtration_value f = filtration_upper_bound); + std::pair insert_simplex_and_subfaces(const Input_vertex_range &vertex_range, Filtration_value f = filtration_upper_bound); template Filtration_value filtration(const Input_vertex_range &vertex_range) const; @@ -27,9 +27,12 @@ protected: }; template -void Filtered_toplex_map::insert_simplex_and_subfaces(const Input_vertex_range &vertex_range, Filtration_value f){ +std::pair Filtered_toplex_map::insert_simplex_and_subfaces(const Input_vertex_range &vertex_range, Filtration_value f){ + Simplex s(vertex_range.begin(),vertex_range.end()); + if(membership(s)) return make_pair(s,false); if(!toplex_maps.count(f)) toplex_maps.emplace(f,Toplex_map()); toplex_maps.at(f).insert_simplex(vertex_range); + return make_pair(s,true); } -- cgit v1.2.3