From 8d7329f3e5ad843e553c3c5503cecc28ef2eead6 Mon Sep 17 00:00:00 2001 From: Gard Spreemann Date: Thu, 20 Apr 2017 11:10:45 +0200 Subject: GUDHI 2.0.0 as released by upstream in a tarball. --- .../Skeleton_blockers_simplices_iterators.h | 38 ++++++++++++---------- 1 file changed, 20 insertions(+), 18 deletions(-) (limited to 'include/gudhi/Skeleton_blocker/iterators/Skeleton_blockers_simplices_iterators.h') diff --git a/include/gudhi/Skeleton_blocker/iterators/Skeleton_blockers_simplices_iterators.h b/include/gudhi/Skeleton_blocker/iterators/Skeleton_blockers_simplices_iterators.h index 3b941be5..2acdb555 100644 --- a/include/gudhi/Skeleton_blocker/iterators/Skeleton_blockers_simplices_iterators.h +++ b/include/gudhi/Skeleton_blocker/iterators/Skeleton_blockers_simplices_iterators.h @@ -4,7 +4,7 @@ * * Author(s): David Salinas * - * Copyright (C) 2014 INRIA Sophia Antipolis-Mediterranee (France) + * Copyright (C) 2014 INRIA * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -19,6 +19,7 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ + #ifndef SKELETON_BLOCKER_ITERATORS_SKELETON_BLOCKERS_SIMPLICES_ITERATORS_H_ #define SKELETON_BLOCKER_ITERATORS_SKELETON_BLOCKERS_SIMPLICES_ITERATORS_H_ @@ -68,10 +69,11 @@ public boost::iterator_facade < Simplex_around_vertex_iterator link_v; std::shared_ptr trie; - std::list nodes_to_be_seen; // todo deque + // TODO(DS): use a deque instead + std::list nodes_to_be_seen; public: - Simplex_around_vertex_iterator() : complex(0) {} + Simplex_around_vertex_iterator() : complex(0) { } Simplex_around_vertex_iterator(const Complex* complex_, Vertex_handle v_) : complex(complex_), @@ -81,15 +83,16 @@ public boost::iterator_facade < Simplex_around_vertex_iterator } private: - // todo return to private Simplex_iterator(const Complex* complex, bool end) : complex_(complex) { set_end(); @@ -306,7 +309,7 @@ public boost::iterator_facade < Simplex_iterator /** * Iterator through the maximal faces of the coboundary of a simplex. - */ + */ template class Simplex_coboundary_iterator : public boost::iterator_facade < Simplex_coboundary_iterator @@ -329,12 +332,12 @@ public boost::iterator_facade < Simplex_coboundary_iteratorvertex_range(); current_vertex = link_vertex_range.begin(); @@ -347,9 +350,9 @@ public boost::iterator_facade < Simplex_coboundary_iteratorconvert_handle_from_another_complex(*link, link_vh); } -public: + public: friend std::ostream& operator<<(std::ostream& stream, const Simplex_coboundary_iterator& sci) { return stream; } @@ -369,8 +372,8 @@ public: // assume that iterator points to the same complex and comes from the same simplex bool equal(const Simplex_coboundary_iterator& other) const { assert(complex == other.complex && sigma == other.sigma); - if(is_end()) return other.is_end(); - if(other.is_end()) return is_end(); + if (is_end()) return other.is_end(); + if (other.is_end()) return is_end(); return *current_vertex == *(other.current_vertex); } @@ -384,13 +387,12 @@ public: return res; } -private: + private: bool is_end() const { return !link || current_vertex == link_vertex_end; } }; - } // namespace skeleton_blocker namespace skbl = skeleton_blocker; -- cgit v1.2.3