summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/Simplex_tree/include/gudhi/Simplex_tree.h6
-rw-r--r--src/Simplex_tree/include/gudhi/Simplex_tree/Simplex_tree_iterators.h8
2 files changed, 7 insertions, 7 deletions
diff --git a/src/Simplex_tree/include/gudhi/Simplex_tree.h b/src/Simplex_tree/include/gudhi/Simplex_tree.h
index 408c0588..50c67185 100644
--- a/src/Simplex_tree/include/gudhi/Simplex_tree.h
+++ b/src/Simplex_tree/include/gudhi/Simplex_tree.h
@@ -571,9 +571,9 @@ class Simplex_tree {
public:
/** \private \brief Test if the vertices have contiguous numbering: 0, 1, etc. */
bool contiguous_vertices() const {
- if(root_.members_.empty()) return true;
- if(root_.members_.begin()->first!=0) return false;
- if(std::prev(root_.members_.end())->first!=root_.members_.size()-1) return false;
+ if (root_.members_.empty()) return true;
+ if (root_.members_.begin()->first != 0) return false;
+ if (std::prev(root_.members_.end())->first != root_.members_.size()-1) return false;
return true;
}
diff --git a/src/Simplex_tree/include/gudhi/Simplex_tree/Simplex_tree_iterators.h b/src/Simplex_tree/include/gudhi/Simplex_tree/Simplex_tree_iterators.h
index c5027f22..794060ee 100644
--- a/src/Simplex_tree/include/gudhi/Simplex_tree/Simplex_tree_iterators.h
+++ b/src/Simplex_tree/include/gudhi/Simplex_tree/Simplex_tree_iterators.h
@@ -99,11 +99,13 @@ class Simplex_tree_boundary_simplex_iterator : public boost::iterator_facade<
// any end() iterator
explicit Simplex_tree_boundary_simplex_iterator(SimplexTree * st)
- : sh_(st->null_simplex()) {
+ : sib_(NULL),
+ sh_(st->null_simplex()) {
}
Simplex_tree_boundary_simplex_iterator(SimplexTree * st, Simplex_handle sh)
: suffix_(),
+ sib_(st->self_siblings(sh)),
st_(st) {
last_ = sh->first;
Siblings * sib = st->self_siblings(sh);
@@ -137,9 +139,7 @@ class Simplex_tree_boundary_simplex_iterator : public boost::iterator_facade<
Siblings * for_sib = sib_;
Siblings * new_sib = sib_->oncles();
auto rit = suffix_.rbegin();
- if (SimplexTree::Options::contiguous_vertices
- && new_sib == nullptr
- && rit != suffix_.rend()) {
+ if (SimplexTree::Options::contiguous_vertices && new_sib == nullptr && rit != suffix_.rend()) {
// We reached the root, use a short-cut to find a vertex. We could also
// optimize finding the second vertex of a segment, but people are
// expected to call endpoints().