diff --git a/include/osp/bsp/model/BspArchitecture.hpp b/include/osp/bsp/model/BspArchitecture.hpp index 48f73f8a..8ac1c0a8 100644 --- a/include/osp/bsp/model/BspArchitecture.hpp +++ b/include/osp/bsp/model/BspArchitecture.hpp @@ -30,7 +30,7 @@ limitations under the License. #include "osp/auxiliary/misc.hpp" #include "osp/concepts/computational_dag_concept.hpp" #include "osp/concepts/graph_traits.hpp" -#include "osp/graph_implementations/vertex_iterator.hpp" +#include "osp/graph_implementations/integral_range.hpp" namespace osp { @@ -282,7 +282,7 @@ class BspArchitecture { } } - inline auto processors() const { return vertex_range(number_processors); } + inline auto processors() const { return integral_range(number_processors); } /** * @brief Computes the average communication cost of the BspArchitecture. diff --git a/include/osp/graph_implementations/adj_list_impl/compact_sparse_graph.hpp b/include/osp/graph_implementations/adj_list_impl/compact_sparse_graph.hpp index 81305773..6ef6007c 100644 --- a/include/osp/graph_implementations/adj_list_impl/compact_sparse_graph.hpp +++ b/include/osp/graph_implementations/adj_list_impl/compact_sparse_graph.hpp @@ -31,7 +31,7 @@ limitations under the License. #include "osp/concepts/constructable_computational_dag_concept.hpp" #include "osp/concepts/specific_graph_impl.hpp" #include "osp/graph_algorithms/directed_graph_edge_view.hpp" -#include "osp/graph_implementations/vertex_iterator.hpp" +#include "osp/graph_implementations/integral_range.hpp" namespace osp { @@ -664,7 +664,7 @@ class Compact_Sparse_Graph { } } - inline auto vertices() const { return vertex_range(number_of_vertices); }; + inline auto vertices() const { return integral_range(number_of_vertices); }; inline vert_t num_vertices() const { return number_of_vertices; }; inline edge_t num_edges() const { return number_of_edges; } diff --git a/include/osp/graph_implementations/adj_list_impl/compact_sparse_graph_edge_desc.hpp b/include/osp/graph_implementations/adj_list_impl/compact_sparse_graph_edge_desc.hpp index ef0a2139..c455b582 100644 --- a/include/osp/graph_implementations/adj_list_impl/compact_sparse_graph_edge_desc.hpp +++ b/include/osp/graph_implementations/adj_list_impl/compact_sparse_graph_edge_desc.hpp @@ -224,7 +224,7 @@ class Compact_Sparse_Graph_EdgeDesc : public Compact_Sparse_Graph(BaseT::number_of_edges); }; + inline auto edges() const { return integral_range(BaseT::number_of_edges); }; inline directed_edge_descriptor edge(const vertex_idx &src, const vertex_idx &tgt) const { typename BaseT::Compact_Children_Edges::Children_range range = BaseT::csc_out_edges.children(src); @@ -240,7 +240,7 @@ class Compact_Sparse_Graph_EdgeDesc : public Compact_Sparse_Graph(BaseT::csc_out_edges.children_indx_begin(vert), BaseT::csc_out_edges.children_indx_begin(vert + 1)); }; + inline auto out_edges(const vertex_idx &vert) const { return integral_range(BaseT::csc_out_edges.children_indx_begin(vert), BaseT::csc_out_edges.children_indx_begin(vert + 1)); }; inline auto in_edges(const vertex_idx &vert) const { return In_Edges_range(vert, *this, BaseT::csc_out_edges); }; template diff --git a/include/osp/graph_implementations/adj_list_impl/computational_dag_edge_idx_vector_impl.hpp b/include/osp/graph_implementations/adj_list_impl/computational_dag_edge_idx_vector_impl.hpp index d1ac5c5f..d72bfb58 100644 --- a/include/osp/graph_implementations/adj_list_impl/computational_dag_edge_idx_vector_impl.hpp +++ b/include/osp/graph_implementations/adj_list_impl/computational_dag_edge_idx_vector_impl.hpp @@ -23,8 +23,6 @@ limitations under the License. #include "osp/graph_algorithms/computational_dag_construction_util.hpp" #include -// #include "container_iterator_adaptor.hpp" - namespace osp { template @@ -160,7 +158,7 @@ class computational_dag_edge_idx_vector_impl { inline auto parents(vertex_idx v) const { return edge_source_range(in_edges_[v], *this); } inline auto children(vertex_idx v) const { return edge_target_range(out_edges_[v], *this); } - inline auto vertices() const { return vertex_range(static_cast(vertices_.size())); } + inline auto vertices() const { return integral_range(static_cast(vertices_.size())); } inline const std::vector &in_edges(vertex_idx v) const { return in_edges_[v]; } inline const std::vector &out_edges(vertex_idx v) const { return out_edges_[v]; } diff --git a/include/osp/graph_implementations/adj_list_impl/computational_dag_vector_impl.hpp b/include/osp/graph_implementations/adj_list_impl/computational_dag_vector_impl.hpp index 349f0213..627b0a86 100644 --- a/include/osp/graph_implementations/adj_list_impl/computational_dag_vector_impl.hpp +++ b/include/osp/graph_implementations/adj_list_impl/computational_dag_vector_impl.hpp @@ -20,7 +20,7 @@ limitations under the License. #include "osp/concepts/computational_dag_concept.hpp" #include "osp/concepts/directed_graph_edge_desc_concept.hpp" #include "osp/graph_algorithms/computational_dag_construction_util.hpp" -#include "osp/graph_implementations/vertex_iterator.hpp" +#include "osp/graph_implementations/integral_range.hpp" #include namespace osp { @@ -115,7 +115,7 @@ class computational_dag_vector_impl { virtual ~computational_dag_vector_impl() = default; - inline auto vertices() const { return vertex_range(static_cast(vertices_.size())); } + inline auto vertices() const { return integral_range(static_cast(vertices_.size())); } inline vertex_idx num_vertices() const { return static_cast(vertices_.size()); } diff --git a/include/osp/graph_implementations/adj_list_impl/dag_vector_adapter.hpp b/include/osp/graph_implementations/adj_list_impl/dag_vector_adapter.hpp index d98d6a89..124c609f 100644 --- a/include/osp/graph_implementations/adj_list_impl/dag_vector_adapter.hpp +++ b/include/osp/graph_implementations/adj_list_impl/dag_vector_adapter.hpp @@ -20,8 +20,7 @@ limitations under the License. #include "computational_dag_vector_impl.hpp" #include "osp/concepts/computational_dag_concept.hpp" #include "osp/graph_algorithms/computational_dag_construction_util.hpp" -#include "osp/graph_implementations/container_iterator_adaptor.hpp" -#include "osp/graph_implementations/vertex_iterator.hpp" +#include "osp/graph_implementations/integral_range.hpp" #include namespace osp { @@ -127,7 +126,7 @@ class dag_vector_adapter { num_vertex_types_ = 1; } - inline auto vertices() const { return vertex_range(static_cast(vertices_.size())); } + inline auto vertices() const { return integral_range(static_cast(vertices_.size())); } inline vertex_idx num_vertices() const { return static_cast(vertices_.size()); } diff --git a/include/osp/graph_implementations/container_iterator_adaptor.hpp b/include/osp/graph_implementations/container_iterator_adaptor.hpp deleted file mode 100644 index 6d3a24ff..00000000 --- a/include/osp/graph_implementations/container_iterator_adaptor.hpp +++ /dev/null @@ -1,165 +0,0 @@ -/* -Copyright 2024 Huawei Technologies Co., Ltd. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. - -@author Toni Boehnlein, Benjamin Lozes, Pal Andras Papp, Raphael S. Steiner -*/ -#pragma once - -#include -#include -#include -#include - -namespace osp { - -/// @brief hides the unique_ptr storage and returns the reference to the stored -/// object. -/// @tparam T the stored type -template -class RemoveUniquePtr { - public: - T &operator()(std::unique_ptr &p) { return *(p.get()); } - const T &operator()(std::unique_ptr const &p) const { return *(p.get()); } -}; - -template -class RemovePtr { - public: - T &operator()(T *p) { return *p; } - const T &operator()(T const *p) const { return *p; } -}; - -template -struct value_type_extractor { - - template - static std::remove_reference_t())> f(int) { - return typename TransT::value_type{}; - } - - template - static DefValueT f(...) { - return DefValueT{}; - } - using type = decltype(f(0)); - static constexpr bool value = not std::is_same_v; -}; - -template -using value_type_extractor_t = typename value_type_extractor::type; - -/// @brief adapter class for iterator, which adapts the value via the `*` -/// operator. -/// @tparam IterT iterator type -/// @tparam TypeTransformerT transformer type, which must be callable -template -class IterAdaptor { - public: - static_assert(std::is_copy_constructible_v); - - using iterator_category = typename std::iterator_traits::iterator_category; - using reference = decltype(std::declval()(*std::declval())); - using pointer = decltype(&std::declval()); - using const_reference = decltype(std::declval()(*std::declval())); - using value_type = value_type_extractor_t>>; - - using difference_type = typename std::iterator_traits::difference_type; - using ThisT = IterAdaptor; - - static constexpr bool _is_random = std::is_convertible_v; - - IterAdaptor() = delete; - explicit IterAdaptor(IterT const &it) noexcept : iter(it) {} - explicit IterAdaptor(IterT &&it) noexcept : iter(std::move(it)) {} - IterAdaptor(ThisT const &) = default; - IterAdaptor(ThisT &&) = default; - - ThisT &operator=(ThisT const &) = default; - ThisT &operator=(ThisT &&) = default; - - ThisT &operator++() { - iter++; - return *this; - } - ThisT operator++(int) { - ThisT ret(iter); - ++iter; - return ret; - } - bool operator==(ThisT const &other) const { return this->iter == other.iter; } - bool operator!=(ThisT const &other) const { return !(*this == other); } - - reference operator*() { return transformer(*iter); } - const reference operator*() const { return transformer(*iter); } - - template - ThisT &operator+=(const std::enable_if_t<_is_random, SizeT> count) { - iter += count; - return *this; - } - - template - inline difference_type operator-(std::enable_if_t<_is_random, RetT> other) const { - return this->iter - other.iter; - } - - private: - TypeTransformerT transformer{}; - IterT iter; -}; - -/// @brief adapts a container via its iterators, converting the contained value -/// to something else (e.g., to remove memory management facilities like -/// std::unique_ptr). -/// -/// An example is converting a `std::vector>` to iterate -/// simply over `AscendEdge`. -/// -/// @tparam ConverterT type for container's value_type conversion -/// @tparam ContainerT container type -template -class ContainerAdaptor { - public: - using iterator = IterAdaptor; - using const_iterator = IterAdaptor; - using value_type = typename iterator::value_type; - using size_type = typename ContainerT::size_type; - using difference_type = typename ContainerT::difference_type; - using reference = value_type &; - using const_reference = const value_type &; - using pointer = value_type *; - using const_pointer = const value_type *; - using ThisT = ContainerAdaptor; - - ContainerAdaptor(ContainerT &_container) : container(_container) {} - - ContainerAdaptor(ThisT const &original) : container(original.container) {} - - inline std::size_t size() const { return container.size(); } - - inline iterator begin() noexcept { return iterator(container.begin()); } - inline iterator end() noexcept { return iterator(container.end()); } - - inline const_iterator begin() const noexcept { return const_iterator(container.cbegin()); } - inline const_iterator end() const noexcept { return const_iterator(container.cend()); } - - inline const_iterator cbegin() const noexcept { return const_pointer(container.cbegin()); } - inline const_iterator cend() const noexcept { return const_pointer(container.cend()); } - - private: - ContainerT &container; -}; - -} // namespace osp \ No newline at end of file diff --git a/include/osp/graph_implementations/eigen_matrix_adapter/sparse_matrix.hpp b/include/osp/graph_implementations/eigen_matrix_adapter/sparse_matrix.hpp index c8bc9219..341389aa 100644 --- a/include/osp/graph_implementations/eigen_matrix_adapter/sparse_matrix.hpp +++ b/include/osp/graph_implementations/eigen_matrix_adapter/sparse_matrix.hpp @@ -24,7 +24,7 @@ limitations under the License. #include "osp/concepts/directed_graph_concept.hpp" #include "osp/concepts/directed_graph_edge_desc_concept.hpp" #include "osp/concepts/computational_dag_concept.hpp" -#include "osp/graph_implementations/vertex_iterator.hpp" +#include "osp/graph_implementations/integral_range.hpp" #include "eigen_sparse_iterator.hpp" namespace osp { @@ -72,7 +72,7 @@ class SparseMatrixImp { /// @brief Return a range over all vertices [0, num_vertices) auto vertices() const { - return osp::vertex_range(num_vertices()); + return osp::integral_range(num_vertices()); } /// @brief Number of edges = total non-zeros minus diagonal elements diff --git a/include/osp/graph_implementations/integral_range.hpp b/include/osp/graph_implementations/integral_range.hpp new file mode 100644 index 00000000..92611da7 --- /dev/null +++ b/include/osp/graph_implementations/integral_range.hpp @@ -0,0 +1,192 @@ +/* +Copyright 2024 Huawei Technologies Co., Ltd. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. + +@author Toni Boehnlein, Benjamin Lozes, Pal Andras Papp, Raphael S. Steiner +*/ +#pragma once + +#include +#include + +namespace osp { + +/** + * @brief A lightweight range class for iterating over a sequence of integral values. + * + * This class provides a view over a range of integers [start, finish), allowing iteration + * without allocating memory for a container. It is useful for iterating over vertex indices + * in a graph or any other sequence of numbers. + * + * @tparam T The integral type of the values (e.g., int, unsigned, size_t). + */ +template +class integral_range { + static_assert(std::is_integral::value, "integral_range requires an integral type"); + + T start; + T finish; + + public: + /** + * @brief Iterator for the integral_range. + * + * This iterator satisfies the RandomAccessIterator concept. + */ + class integral_iterator { // public for std::reverse_iterator + public: + using iterator_category = std::random_access_iterator_tag; + using difference_type = std::ptrdiff_t; + using value_type = T; + using pointer = void; // Not a real pointer + using reference = T; // Not a real reference + + /** + * @brief Proxy object to support operator-> for integral types. + */ + struct arrow_proxy { + T value; + constexpr const T* operator->() const noexcept { return &value; } + }; + + private: + value_type current; + + public: + /** + * @brief Default constructor. Initializes iterator to 0. + */ + constexpr integral_iterator() noexcept : current(0) {} + + /** + * @brief Constructs an iterator pointing to the given value. + * @param start The starting value. + */ + explicit constexpr integral_iterator(value_type start) noexcept : current(start) {} + + constexpr integral_iterator(const integral_iterator &) noexcept = default; + constexpr integral_iterator &operator=(const integral_iterator &) noexcept = default; + ~integral_iterator() = default; + + /** + * @brief Dereference operator. + * @return The current integral value. + */ + [[nodiscard]] constexpr value_type operator*() const noexcept { return current; } + + /** + * @brief Arrow operator. + * @return A proxy object that allows access to the address of the value. + */ + [[nodiscard]] constexpr arrow_proxy operator->() const noexcept { return arrow_proxy{current}; } + + constexpr integral_iterator &operator++() noexcept { + ++current; + return *this; + } + + constexpr integral_iterator operator++(int) noexcept { + integral_iterator temp = *this; + ++(*this); + return temp; + } + + constexpr integral_iterator &operator--() noexcept { + --current; + return *this; + } + + constexpr integral_iterator operator--(int) noexcept { + integral_iterator temp = *this; + --(*this); + return temp; + } + + [[nodiscard]] constexpr bool operator==(const integral_iterator &other) const noexcept { return current == other.current; } + [[nodiscard]] constexpr bool operator!=(const integral_iterator &other) const noexcept { return !(*this == other); } + + constexpr integral_iterator &operator+=(difference_type n) noexcept { + current = static_cast(current + n); + return *this; + } + [[nodiscard]] constexpr integral_iterator operator+(difference_type n) const noexcept { + integral_iterator temp = *this; + return temp += n; + } + [[nodiscard]] friend constexpr integral_iterator operator+(difference_type n, const integral_iterator &it) noexcept { + return it + n; + } + + constexpr integral_iterator &operator-=(difference_type n) noexcept { + current = static_cast(current - n); + return *this; + } + [[nodiscard]] constexpr integral_iterator operator-(difference_type n) const noexcept { + integral_iterator temp = *this; + return temp -= n; + } + [[nodiscard]] constexpr difference_type operator-(const integral_iterator &other) const noexcept { + return static_cast(current) - static_cast(other.current); + } + + [[nodiscard]] constexpr value_type operator[](difference_type n) const noexcept { return *(*this + n); } + + [[nodiscard]] constexpr bool operator<(const integral_iterator &other) const noexcept { return current < other.current; } + [[nodiscard]] constexpr bool operator>(const integral_iterator &other) const noexcept { return current > other.current; } + [[nodiscard]] constexpr bool operator<=(const integral_iterator &other) const noexcept { return current <= other.current; } + [[nodiscard]] constexpr bool operator>=(const integral_iterator &other) const noexcept { return current >= other.current; } + }; + + using reverse_integral_iterator = std::reverse_iterator; + + public: + /** + * @brief Constructs a range [0, end). + * @param end_ The exclusive upper bound. + */ + constexpr integral_range(T end_) noexcept : start(static_cast(0)), finish(end_) {} + + /** + * @brief Constructs a range [start, end). + * @param start_ The inclusive lower bound. + * @param end_ The exclusive upper bound. + */ + constexpr integral_range(T start_, T end_) noexcept : start(start_), finish(end_) {} + + [[nodiscard]] constexpr integral_iterator begin() const noexcept { return integral_iterator(start); } + [[nodiscard]] constexpr integral_iterator cbegin() const noexcept { return integral_iterator(start); } + + [[nodiscard]] constexpr integral_iterator end() const noexcept { return integral_iterator(finish); } + [[nodiscard]] constexpr integral_iterator cend() const noexcept { return integral_iterator(finish); } + + [[nodiscard]] constexpr reverse_integral_iterator rbegin() const noexcept { return reverse_integral_iterator(end()); } + [[nodiscard]] constexpr reverse_integral_iterator crbegin() const noexcept { return reverse_integral_iterator(cend()); } + + [[nodiscard]] constexpr reverse_integral_iterator rend() const noexcept { return reverse_integral_iterator(begin()); } + [[nodiscard]] constexpr reverse_integral_iterator crend() const noexcept { return reverse_integral_iterator(cbegin()); } + + /** + * @brief Returns the number of elements in the range. + * @return The size of the range. + */ + [[nodiscard]] constexpr auto size() const noexcept { return finish - start; } + + /** + * @brief Checks if the range is empty. + * @return True if the range is empty, false otherwise. + */ + [[nodiscard]] constexpr bool empty() const noexcept { return start == finish; } +}; + +} // namespace osp diff --git a/include/osp/graph_implementations/vertex_iterator.hpp b/include/osp/graph_implementations/vertex_iterator.hpp deleted file mode 100644 index 278bbc59..00000000 --- a/include/osp/graph_implementations/vertex_iterator.hpp +++ /dev/null @@ -1,114 +0,0 @@ -/* -Copyright 2024 Huawei Technologies Co., Ltd. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. - -@author Toni Boehnlein, Benjamin Lozes, Pal Andras Papp, Raphael S. Steiner -*/ -#pragma once - -#include - -namespace osp { - -template -class vertex_range { - static_assert(std::is_integral::value); - - T start; - T finish; -public: - class vertex_iterator { // public for std::reverse_iterator - public: - using iterator_category = std::random_access_iterator_tag; - using difference_type = std::ptrdiff_t; - using value_type = T; - // pointer and reference are not real pointers/references to the value - using pointer = const T *; - using reference = const T; - - private: - value_type current; - - public: - vertex_iterator() : current(0) {} - explicit vertex_iterator(value_type start) : current(start) {} - vertex_iterator(const vertex_iterator &) = default; - vertex_iterator &operator=(const vertex_iterator &) = default; - ~vertex_iterator() = default; - - inline value_type operator*() const { return current; } - - inline vertex_iterator &operator++() { - ++current; - return *this; - } - - inline vertex_iterator operator++(int) { - vertex_iterator temp = *this; - ++(*this); - return temp; - } - - inline vertex_iterator &operator--() { - --current; - return *this; - } - - inline vertex_iterator operator--(int) { - vertex_iterator temp = *this; - --(*this); - return temp; - } - - inline bool operator==(const vertex_iterator &other) const { return current == other.current; } - inline bool operator!=(const vertex_iterator &other) const { return !(*this == other); } - - inline vertex_iterator &operator+=(difference_type n) { current += n; return *this; } - inline vertex_iterator operator+(difference_type n) const { vertex_iterator temp = *this; return temp += n; } - friend inline vertex_iterator operator+(difference_type n, const vertex_iterator& it) { return it + n; } - - inline vertex_iterator &operator-=(difference_type n) { current -= n; return *this; } - inline vertex_iterator operator-(difference_type n) const { vertex_iterator temp = *this; return temp -= n; } - inline difference_type operator-(const vertex_iterator& other) const { return current - other.current; } - - inline value_type operator[](difference_type n) const { return *(*this + n); } - - inline bool operator<(const vertex_iterator &other) const { return current < other.current; } - inline bool operator>(const vertex_iterator &other) const { return current > other.current; } - inline bool operator<=(const vertex_iterator &other) const { return current <= other.current; } - inline bool operator>=(const vertex_iterator &other) const { return current >= other.current; } - }; - - using reverse_vertex_iterator = std::reverse_iterator; - - public: - vertex_range(T end_) : start(static_cast(0)), finish(end_) {} - vertex_range(T start_, T end_) : start(start_), finish(end_) {} - - inline vertex_iterator begin() const { return vertex_iterator(start); } - inline vertex_iterator cbegin() const { return vertex_iterator(start); } - - inline vertex_iterator end() const { return vertex_iterator(finish); } - inline vertex_iterator cend() const { return vertex_iterator(finish); } - - inline reverse_vertex_iterator rbegin() const { return reverse_vertex_iterator(end()); } - inline reverse_vertex_iterator crbegin() const { return reverse_vertex_iterator(cend()); } - - inline reverse_vertex_iterator rend() const { return reverse_vertex_iterator(begin()); } - inline reverse_vertex_iterator crend() const { return reverse_vertex_iterator(cbegin()); } - - inline auto size() const { return finish - start; } -}; - -} // namespace osp \ No newline at end of file diff --git a/tests/iterators.cpp b/tests/iterators.cpp index cefa7a0b..04812cb8 100644 --- a/tests/iterators.cpp +++ b/tests/iterators.cpp @@ -19,13 +19,13 @@ limitations under the License. #define BOOST_TEST_MODULE Bsp_Architecture #include -#include "osp/graph_implementations/vertex_iterator.hpp" +#include "osp/graph_implementations/integral_range.hpp" using namespace osp; -BOOST_AUTO_TEST_CASE(vertex_iterator_test) { +BOOST_AUTO_TEST_CASE(integral_range_test) { - vertex_range range(0, 10); + integral_range range(0, 10); BOOST_CHECK_EQUAL(range.size(), 10); int count = 0; @@ -54,7 +54,7 @@ BOOST_AUTO_TEST_CASE(vertex_iterator_test) { BOOST_CHECK_EQUAL(count, -1); count = 0; - vertex_range range2(10); + integral_range range2(10); BOOST_CHECK_EQUAL(range2.size(), 10); for (auto v : range2) { @@ -73,7 +73,7 @@ BOOST_AUTO_TEST_CASE(vertex_iterator_test) { count = 5; - vertex_range range3(5, 15); + integral_range range3(5, 15); BOOST_CHECK_EQUAL(range3.size(), 10); for (auto v : range3) {