diff options
author | vrouvrea <vrouvrea@636b058d-ea47-450e-bf9e-a15bfbe3eedb> | 2016-11-29 16:50:55 +0000 |
---|---|---|
committer | vrouvrea <vrouvrea@636b058d-ea47-450e-bf9e-a15bfbe3eedb> | 2016-11-29 16:50:55 +0000 |
commit | 97d80185d6ec4d5e8f81b4cd4936d29a6d63b05b (patch) | |
tree | 58b2340961e93d39ea8f837f0658aa97f1c4ab81 /src/cython/include | |
parent | 2976ab407d564b46173aeedf5c1e876b5cfc5a97 (diff) |
Fix interface for Alpha complex and Tangential complex
git-svn-id: svn+ssh://scm.gforge.inria.fr/svnroot/gudhi/branches/ST_cythonize@1801 636b058d-ea47-450e-bf9e-a15bfbe3eedb
Former-commit-id: 995b53c7f65057ec155988b90f17299665eab4ae
Diffstat (limited to 'src/cython/include')
-rw-r--r-- | src/cython/include/Alpha_complex_interface.h | 6 | ||||
-rw-r--r-- | src/cython/include/Tangential_complex_interface.h | 14 |
2 files changed, 10 insertions, 10 deletions
diff --git a/src/cython/include/Alpha_complex_interface.h b/src/cython/include/Alpha_complex_interface.h index 15384206..81761c77 100644 --- a/src/cython/include/Alpha_complex_interface.h +++ b/src/cython/include/Alpha_complex_interface.h @@ -69,9 +69,9 @@ class Alpha_complex_interface { return vd; } - void create_simplex_tree(Simplex_tree_interface<>& simplex_tree, double max_alpha_square) { - alpha_complex_->create_complex(simplex_tree, max_alpha_square); - simplex_tree.initialize_filtration(); + void create_simplex_tree(Simplex_tree_interface<>* simplex_tree, double max_alpha_square) { + alpha_complex_->create_complex(*simplex_tree, max_alpha_square); + simplex_tree->initialize_filtration(); } private: diff --git a/src/cython/include/Tangential_complex_interface.h b/src/cython/include/Tangential_complex_interface.h index 49d66476..c7fce557 100644 --- a/src/cython/include/Tangential_complex_interface.h +++ b/src/cython/include/Tangential_complex_interface.h @@ -73,14 +73,12 @@ class Tangential_complex_interface { num_inconsistencies_ = tangential_complex_->number_of_inconsistent_simplices(); } - std::vector<double> get_point(int vh) { + std::vector<double> get_point(unsigned vh) { std::vector<double> vd; - try { + if (vh < tangential_complex_->number_of_vertices()) { Point_d ph = tangential_complex_->get_point(vh); for (auto coord = ph.cartesian_begin(); coord < ph.cartesian_end(); coord++) vd.push_back(*coord); - } catch (std::out_of_range outofrange) { - // std::out_of_range is thrown in case not found. Other exceptions must be re-thrown } return vd; } @@ -101,9 +99,11 @@ class Tangential_complex_interface { return num_inconsistencies_.num_inconsistent_stars; } - void create_simplex_tree(Simplex_tree<>& simplex_tree) { - tangential_complex_->create_complex<Gudhi::Simplex_tree<Gudhi::Simplex_tree_options_full_featured>>(simplex_tree); - simplex_tree.initialize_filtration(); + void create_simplex_tree(Simplex_tree<>* simplex_tree) { + int max_dim = tangential_complex_->create_complex<Gudhi::Simplex_tree<Gudhi::Simplex_tree_options_full_featured>>(*simplex_tree); + // FIXME + simplex_tree->set_dimension(max_dim); + simplex_tree->initialize_filtration(); } private: |