diff --git a/include/boost/graph/reverse_graph.hpp b/include/boost/graph/reverse_graph.hpp index 3e38b8bf..440e8952 100644 --- a/include/boost/graph/reverse_graph.hpp +++ b/include/boost/graph/reverse_graph.hpp @@ -37,6 +37,12 @@ class reverse_graph { typedef typename graph_traits::edge_iterator edge_iterator; typedef typename graph_traits::vertices_size_type vertices_size_type; typedef typename graph_traits::edges_size_type edges_size_type; + + // More of the same [?] used by detail::edge_property_map, vertex_property_map + typedef typename BidirectionalGraph::edge_property_type edge_property_type; + typedef typename BidirectionalGraph::vertex_property_type vertex_property_type; + typedef typename BidirectionalGraph::graph_tag graph_tag; + // would be private, but template friends aren't portable enough. // private: @@ -132,8 +138,8 @@ edge(const typename BidirectionalGraph::vertex_descriptor u, } template -inline std::pair +inline std::pair in_edges(const typename BidirectionalGraph::vertex_descriptor u, const reverse_graph& g) { @@ -148,6 +154,20 @@ in_degree(const typename BidirectionalGraph::vertex_descriptor u, return out_degree(u, g.m_g); } +template +inline typename graph_traits::vertex_descriptor +source(const Edge& e, const reverse_graph& g) +{ + return target(e, g.m_g); +} + +template +inline typename graph_traits::vertex_descriptor +target(const Edge& e, const reverse_graph& g) +{ + return source(e, g.m_g); +} + } // namespace boost #endif