diff options
author | ROUVREAU Vincent <vincent.rouvreau@inria.fr> | 2020-11-04 09:04:19 +0100 |
---|---|---|
committer | ROUVREAU Vincent <vincent.rouvreau@inria.fr> | 2020-11-04 09:04:19 +0100 |
commit | eb8164b76a062fe510a9281bfebfa34f66c72163 (patch) | |
tree | 3d3b8adb5c431011387c0bba637707344d0780cb /src/python/include | |
parent | 218be4f4c88f94c2c281cce16d5a9cd41fdd2fd8 (diff) | |
parent | 6811a26e8b45ba4fde5ad3268d0eb07d3070a349 (diff) |
Merge branch 'master' into coxeter_integration
Diffstat (limited to 'src/python/include')
-rw-r--r-- | src/python/include/Simplex_tree_interface.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/python/include/Simplex_tree_interface.h b/src/python/include/Simplex_tree_interface.h index e288a8cf..baff3850 100644 --- a/src/python/include/Simplex_tree_interface.h +++ b/src/python/include/Simplex_tree_interface.h @@ -39,6 +39,7 @@ class Simplex_tree_interface : public Simplex_tree<SimplexTreeOptions> { using Skeleton_simplex_iterator = typename Base::Skeleton_simplex_iterator; using Complex_simplex_iterator = typename Base::Complex_simplex_iterator; using Extended_filtration_data = typename Base::Extended_filtration_data; + using Boundary_simplex_iterator = typename Base::Boundary_simplex_iterator; public: @@ -219,6 +220,15 @@ class Simplex_tree_interface : public Simplex_tree<SimplexTreeOptions> { // this specific case works because the range is just a pair of iterators - won't work if range was a vector return Base::skeleton_simplex_range(dimension).end(); } + + std::pair<Boundary_simplex_iterator, Boundary_simplex_iterator> get_boundary_iterators(const Simplex& simplex) { + auto bd_sh = Base::find(simplex); + if (bd_sh == Base::null_simplex()) + throw std::runtime_error("simplex not found - cannot find boundaries"); + // this specific case works because the range is just a pair of iterators - won't work if range was a vector + auto boundary_srange = Base::boundary_simplex_range(bd_sh); + return std::make_pair(boundary_srange.begin(), boundary_srange.end()); + } }; } // namespace Gudhi |