diff options
author | vrouvrea <vrouvrea@636b058d-ea47-450e-bf9e-a15bfbe3eedb> | 2017-09-21 06:22:19 +0000 |
---|---|---|
committer | vrouvrea <vrouvrea@636b058d-ea47-450e-bf9e-a15bfbe3eedb> | 2017-09-21 06:22:19 +0000 |
commit | 409874ad0812c863a924bd4482d76c718620c0b9 (patch) | |
tree | eda04edd461be623ab8f75d259fa455d822185cc | |
parent | c762ffb234a86d6acce63546bfacbf419ca62bbc (diff) |
Add some comments for readability
git-svn-id: svn+ssh://scm.gforge.inria.fr/svnroot/gudhi/branches/ST_automatic_dimension_set@2697 636b058d-ea47-450e-bf9e-a15bfbe3eedb
Former-commit-id: 986cc3b862ceca993a6fdd8cdee6da2c1ed4cc14
-rw-r--r-- | src/Simplex_tree/include/gudhi/Simplex_tree.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/Simplex_tree/include/gudhi/Simplex_tree.h b/src/Simplex_tree/include/gudhi/Simplex_tree.h index dc684594..5d1885b8 100644 --- a/src/Simplex_tree/include/gudhi/Simplex_tree.h +++ b/src/Simplex_tree/include/gudhi/Simplex_tree.h @@ -1204,6 +1204,7 @@ class Simplex_tree { */ bool auto_dimension_set(int old_dimension) { int new_dimension = -1; + // Browse the tree from te left to the right as higher dimension cells are more likely on the left part of the tree for (Simplex_handle sh : skeleton_simplex_range(old_dimension)) { #ifdef DEBUG_TRACES for (auto vertex : simplex_vertex_range(sh)) { @@ -1214,6 +1215,7 @@ class Simplex_tree { int sh_dimension = dimension(sh); if (sh_dimension >= old_dimension) + // Stop browsing as soon as the dimension is reached, no need to go furter return false; new_dimension = std::max<int>(new_dimension, sh_dimension); } |