16 #ifndef UTIL_GRAPH_ITERATORS_H_
17 #define UTIL_GRAPH_ITERATORS_H_
37 template <
typename Iterator>
41 using value_type =
typename std::iterator_traits<Iterator>::value_type;
44 Iterator
begin()
const {
return begin_; }
45 Iterator
end()
const {
return end_; }
50 const Iterator begin_;
57 template <
typename Iterator>
61 template <
typename Iterator>
63 std::pair<Iterator, Iterator> begin_end) {
70 template <
typename MultiMap>
72 MultiMap& multi_map,
const typename MultiMap::key_type& key) {
75 template <
typename MultiMap>
77 const MultiMap& multi_map,
const typename MultiMap::key_type& key) {
85 template <
typename Container>
89 typename Container::const_reverse_iterator
begin()
const {
92 typename Container::const_reverse_iterator
end()
const {
return c_.rend(); }
97 template <
typename Container>
103 template <
typename IntegerType>
105 :
public std::iterator<std::input_iterator_tag, IntegerType> {
109 : index_(other.index_) {}
111 index_ = other.index_;
116 return index_ < other.index_;
119 return index_ == other.index_;
129 return previous_position;
145 template <
typename IntegerType>
159 explicit Iterator(
typename std::vector<T>::iterator it) : it_(it) {}
168 typename std::vector<T>::iterator it_;
174 std::vector<T>*
const v_;
178 #endif // UTIL_GRAPH_ITERATORS_H_