From be7555abfb97f02c37de96736f7a0993d4d47f03 Mon Sep 17 00:00:00 2001 From: ROUVREAU Vincent Date: Tue, 22 Sep 2020 18:12:31 +0200 Subject: clang-format files --- .../Permutahedral_representation/Size_range.h | 40 +++++++--------------- 1 file changed, 13 insertions(+), 27 deletions(-) (limited to 'src/Coxeter_triangulation/include/gudhi/Permutahedral_representation/Size_range.h') diff --git a/src/Coxeter_triangulation/include/gudhi/Permutahedral_representation/Size_range.h b/src/Coxeter_triangulation/include/gudhi/Permutahedral_representation/Size_range.h index f41335e9..c43effc8 100644 --- a/src/Coxeter_triangulation/include/gudhi/Permutahedral_representation/Size_range.h +++ b/src/Coxeter_triangulation/include/gudhi/Permutahedral_representation/Size_range.h @@ -22,33 +22,26 @@ namespace coxeter_triangulation { /** \brief Auxillary iterator class for sizes of parts in an ordered set partition. */ template -class Size_iterator : public boost::iterator_facade< Size_iterator, - std::size_t const, - boost::forward_traversal_tag> { +class Size_iterator + : public boost::iterator_facade, std::size_t const, boost::forward_traversal_tag> { friend class boost::iterator_core_access; private: - bool equal(Size_iterator const& other) const { - return (is_end_ && other.is_end_); - } + bool equal(Size_iterator const& other) const { return (is_end_ && other.is_end_); } - std::size_t const& dereference() const { - return value_; - } + std::size_t const& dereference() const { return value_; } void increment() { if (++t_it_ == t_end_) { is_end_ = true; return; } - value_ = t_it_->size()-1; + value_ = t_it_->size() - 1; } public: - Size_iterator(const T_it& t_begin, const T_it& t_end) - : t_it_(t_begin), t_end_(t_end), is_end_(t_begin == t_end) { - if (!is_end_) - value_ = t_it_->size()-1; + Size_iterator(const T_it& t_begin, const T_it& t_end) : t_it_(t_begin), t_end_(t_end), is_end_(t_begin == t_end) { + if (!is_end_) value_ = t_it_->size() - 1; } private: @@ -63,25 +56,18 @@ class Size_range { public: typedef Size_iterator iterator; - + Size_range(const T& t) : t_(t) {} - - std::size_t operator[](std::size_t i) const { - return t_[i].size()-1; - } - iterator begin() const { - return iterator(t_.begin(), t_.end()); - } + std::size_t operator[](std::size_t i) const { return t_[i].size() - 1; } - iterator end() const { - return iterator(t_.end(), t_.end()); - } + iterator begin() const { return iterator(t_.begin(), t_.end()); } + iterator end() const { return iterator(t_.end(), t_.end()); } }; -} // namespace coxeter_triangulation +} // namespace coxeter_triangulation -} // namespace Gudhi +} // namespace Gudhi #endif -- cgit v1.2.3