diff options
author | vrouvrea <vrouvrea@636b058d-ea47-450e-bf9e-a15bfbe3eedb> | 2017-09-20 18:39:29 +0000 |
---|---|---|
committer | vrouvrea <vrouvrea@636b058d-ea47-450e-bf9e-a15bfbe3eedb> | 2017-09-20 18:39:29 +0000 |
commit | e2f26211caaef3c3a564e5858d513b25804eb35e (patch) | |
tree | 050806477257e144ae5c4c85abfe1f0b3e6413fe /src/Simplex_tree/include/gudhi | |
parent | 664b4dcbeb549e89128802b2402d60cb6d28268d (diff) |
Separate and improve simplex tree iostream operators to test automatic dimension set on iostream operators
git-svn-id: svn+ssh://scm.gforge.inria.fr/svnroot/gudhi/branches/ST_automatic_dimension_set@2693 636b058d-ea47-450e-bf9e-a15bfbe3eedb
Former-commit-id: dafd077f3ed20eafaccdb27d56e02b3d9e5c44a7
Diffstat (limited to 'src/Simplex_tree/include/gudhi')
-rw-r--r-- | src/Simplex_tree/include/gudhi/Simplex_tree.h | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/src/Simplex_tree/include/gudhi/Simplex_tree.h b/src/Simplex_tree/include/gudhi/Simplex_tree.h index 478ed80f..76e594d3 100644 --- a/src/Simplex_tree/include/gudhi/Simplex_tree.h +++ b/src/Simplex_tree/include/gudhi/Simplex_tree.h @@ -763,7 +763,8 @@ class Simplex_tree { /** Set an upper bound for the filtration values. */ void set_filtration(Filtration_value fil) { - threshold_ = fil; + if (Options::store_filtration) + threshold_ = fil; } /** Set a dimension for the simplicial complex. */ @@ -1288,14 +1289,8 @@ std::istream& operator>>(std::istream & is, Simplex_tree<T...> & st) { std::vector<typename ST::Vertex_handle> simplex; typename ST::Filtration_value fil; typename ST::Filtration_value max_fil = 0; - int max_dim = -1; while (read_simplex(is, simplex, fil)) { // read all simplices in the file as a list of vertices - // Warning : simplex_size needs to be casted in int - Can be 0 - int dim = static_cast<int> (simplex.size() - 1); - if (max_dim < dim) { - max_dim = dim; - } if (max_fil < fil) { max_fil = fil; } @@ -1303,7 +1298,6 @@ std::istream& operator>>(std::istream & is, Simplex_tree<T...> & st) { st.insert_simplex(simplex, fil); simplex.clear(); } - st.set_dimension(max_dim); st.set_filtration(max_fil); return is; |