diff options
author | vrouvrea <vrouvrea@636b058d-ea47-450e-bf9e-a15bfbe3eedb> | 2016-11-25 16:00:19 +0000 |
---|---|---|
committer | vrouvrea <vrouvrea@636b058d-ea47-450e-bf9e-a15bfbe3eedb> | 2016-11-25 16:00:19 +0000 |
commit | af146a2e48c16855355ac599cbc617250727d244 (patch) | |
tree | bab3117c6886f41ec9d2a1869bc70105ecdd63b3 /src/cython/include/Simplex_tree_interface.h | |
parent | f843ef3f8e4ab4ce94a28ded6d8cafd37f2b2311 (diff) |
Add of tangential complex doc
Separate simplex tree from alpha complex
git-svn-id: svn+ssh://scm.gforge.inria.fr/svnroot/gudhi/branches/ST_cythonize@1788 636b058d-ea47-450e-bf9e-a15bfbe3eedb
Former-commit-id: 1cf4a35e0a099501eb1cb6b9809041dd1a1e2617
Diffstat (limited to 'src/cython/include/Simplex_tree_interface.h')
-rw-r--r-- | src/cython/include/Simplex_tree_interface.h | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/cython/include/Simplex_tree_interface.h b/src/cython/include/Simplex_tree_interface.h index ad7be1a8..06ec6d40 100644 --- a/src/cython/include/Simplex_tree_interface.h +++ b/src/cython/include/Simplex_tree_interface.h @@ -36,6 +36,7 @@ namespace Gudhi { template<typename SimplexTreeOptions = Simplex_tree_options_full_featured> class Simplex_tree_interface : public Simplex_tree<SimplexTreeOptions> { + public: typedef typename Simplex_tree<SimplexTreeOptions>::Simplex_handle Simplex_handle; typedef typename std::pair<Simplex_handle, bool> Insertion_result; using Simplex = std::vector<Vertex_handle>; @@ -50,6 +51,7 @@ class Simplex_tree_interface : public Simplex_tree<SimplexTreeOptions> { bool insert_simplex_and_subfaces(const Simplex& complex, Filtration_value filtration = 0) { Insertion_result result = Simplex_tree<SimplexTreeOptions>::insert_simplex_and_subfaces(complex, filtration); + Simplex_tree<SimplexTreeOptions>::initialize_filtration(); return (result.second); } @@ -58,7 +60,8 @@ class Simplex_tree_interface : public Simplex_tree<SimplexTreeOptions> { } void remove_maximal_simplex(const Simplex& complex) { - return Simplex_tree<SimplexTreeOptions>::remove_maximal_simplex(Simplex_tree<SimplexTreeOptions>::find(complex)); + Simplex_tree<SimplexTreeOptions>::remove_maximal_simplex(Simplex_tree<SimplexTreeOptions>::find(complex)); + Simplex_tree<SimplexTreeOptions>::initialize_filtration(); } Complex_tree get_filtered_tree() { @@ -66,8 +69,10 @@ class Simplex_tree_interface : public Simplex_tree<SimplexTreeOptions> { for (auto f_simplex : Simplex_tree<SimplexTreeOptions>::filtration_simplex_range()) { Simplex simplex; for (auto vertex : Simplex_tree<SimplexTreeOptions>::simplex_vertex_range(f_simplex)) { + std::cout << " " << vertex; simplex.insert(simplex.begin(), vertex); } + std::cout << std::endl; filtered_tree.push_back(std::make_pair(simplex, Simplex_tree<SimplexTreeOptions>::filtration(f_simplex))); } return filtered_tree; |