Attempt to represent the S^2->S^3 header reorganisation as a series of "hg rename" operations
2 //=======================================================================
3 // Copyright 1997, 1998, 1999, 2000 University of Notre Dame.
4 // Authors: Andrew Lumsdaine, Lie-Quan Lee, Jeremy G. Siek
6 // Distributed under the Boost Software License, Version 1.0. (See
7 // accompanying file LICENSE_1_0.txt or copy at
8 // http://www.boost.org/LICENSE_1_0.txt)
9 //=======================================================================
11 #ifndef BOOST_GRAPH_DETAIL_INCIDENCE_ITERATOR_HPP
12 #define BOOST_GRAPH_DETAIL_INCIDENCE_ITERATOR_HPP
23 struct in_edge_tag { };
24 struct out_edge_tag { };
26 template <class Vertex, class Edge, class Iterator1D, class EdgeDir>
27 struct bidir_incidence_iterator {
28 typedef bidir_incidence_iterator self;
29 typedef Edge edge_type;
30 typedef typename Edge::property_type EdgeProperty;
32 typedef int difference_type;
33 typedef std::forward_iterator_tag iterator_category;
34 typedef edge_type reference;
35 typedef edge_type value_type;
36 typedef value_type* pointer;
37 inline bidir_incidence_iterator() {}
38 inline bidir_incidence_iterator(Iterator1D ii, Vertex src)
39 : i(ii), _src(src) { }
41 inline self& operator++() { ++i; return *this; }
42 inline self operator++(int) { self tmp = *this; ++(*this); return tmp; }
44 inline reference operator*() const {
45 return deref_helper(EdgeDir());
47 inline self* operator->() { return this; }
49 Iterator1D& iter() { return i; }
50 const Iterator1D& iter() const { return i; }
55 inline reference deref_helper(out_edge_tag) const {
56 return edge_type( _src, (*i).get_target(), &(*i).get_property() );
58 inline reference deref_helper(in_edge_tag) const {
59 return edge_type((*i).get_target(), _src, &(*i).get_property() );
63 template <class V, class E, class Iter, class Dir>
64 inline bool operator==(const bidir_incidence_iterator<V,E,Iter,Dir>& x,
65 const bidir_incidence_iterator<V,E,Iter,Dir>& y)
69 template <class V, class E, class Iter, class Dir>
70 inline bool operator!=(const bidir_incidence_iterator<V,E,Iter,Dir>& x,
71 const bidir_incidence_iterator<V,E,Iter,Dir>& y)