Ticket #6306: reverse_graph.patch

File reverse_graph.patch, 1.0 KB (added by Alex Hagen-Zanker <ahh34@…>, 11 years ago)

patch that modifies edge(u,v,reverse_graph)

  • reverse_graph.hpp

     
    269269}
    270270
    271271template <class BidirectionalGraph, class GRef>
    272 inline std::pair<typename graph_traits<BidirectionalGraph>::edge_descriptor,
    273                  bool>
     272inline std::pair< typename graph_traits<reverse_graph<BidirectionalGraph,GRef> >::edge_descriptor,
     273                  bool>
    274274edge(const typename graph_traits<BidirectionalGraph>::vertex_descriptor u,
    275275     const typename graph_traits<BidirectionalGraph>::vertex_descriptor v,
    276276     const reverse_graph<BidirectionalGraph,GRef>& g)
    277277{
    278     return edge(v, u, g.m_g);
     278    typedef typename graph_traits<BidirectionalGraph>::edge_descriptor underlying_edge_descriptor;
     279    std::pair<underlying_edge_descriptor, bool> e = edge(v, u, g.m_g);
     280    return std::make_pair(detail::reverse_graph_edge_descriptor<underlying_edge_descriptor>(e.first), e.second);
    279281}
    280282
    281283template <class BidirectionalGraph, class GRef>