summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorvrouvrea <vrouvrea@636b058d-ea47-450e-bf9e-a15bfbe3eedb>2017-09-21 06:22:19 +0000
committervrouvrea <vrouvrea@636b058d-ea47-450e-bf9e-a15bfbe3eedb>2017-09-21 06:22:19 +0000
commit409874ad0812c863a924bd4482d76c718620c0b9 (patch)
treeeda04edd461be623ab8f75d259fa455d822185cc /src
parentc762ffb234a86d6acce63546bfacbf419ca62bbc (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
Diffstat (limited to 'src')
-rw-r--r--src/Simplex_tree/include/gudhi/Simplex_tree.h2
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);
}