From d4e507bab8a89b1f6fac7c7f421e6ca45f9f2b28 Mon Sep 17 00:00:00 2001 From: Jeremy Siek Date: Mon, 9 Feb 2004 18:21:05 +0000 Subject: [PATCH] fixed bug with regards to in_edge_list for undirected graphs [SVN r22222] --- include/boost/graph/detail/adjacency_list.hpp | 54 ++++++++++++------- 1 file changed, 36 insertions(+), 18 deletions(-) diff --git a/include/boost/graph/detail/adjacency_list.hpp b/include/boost/graph/detail/adjacency_list.hpp index d68dc705..31212bd5 100644 --- a/include/boost/graph/detail/adjacency_list.hpp +++ b/include/boost/graph/detail/adjacency_list.hpp @@ -767,6 +767,24 @@ namespace boost { } }; + // Had to make these non-members to avoid accidental instantiation + // on SGI MIPSpro C++ + template + inline typename C::InEdgeList& + in_edge_list(undirected_graph_helper&, + typename C::vertex_descriptor v) + { + typename C::stored_vertex* sv = (typename C::stored_vertex*)v; + return sv->m_out_edges; + } + template + inline const typename C::InEdgeList& + in_edge_list(const undirected_graph_helper&, + typename C::vertex_descriptor v) { + typename C::stored_vertex* sv = (typename C::stored_vertex*)v; + return sv->m_out_edges; + } + // O(E/V) template inline void @@ -964,6 +982,24 @@ namespace boost { typedef bidir_adj_list_traversal_tag traversal_category; }; + // Had to make these non-members to avoid accidental instantiation + // on SGI MIPSpro C++ + template + inline typename C::InEdgeList& + in_edge_list(bidirectional_graph_helper&, + typename C::vertex_descriptor v) + { + typename C::stored_vertex* sv = (typename C::stored_vertex*)v; + return sv->m_in_edges; + } + template + inline const typename C::InEdgeList& + in_edge_list(const bidirectional_graph_helper&, + typename C::vertex_descriptor v) { + typename C::stored_vertex* sv = (typename C::stored_vertex*)v; + return sv->m_in_edges; + } + template inline void remove_edge_if(Predicate pred, bidirectional_graph_helper& g_) @@ -1664,24 +1700,6 @@ namespace boost { typename Config::EdgeContainer m_edges; StoredVertexList m_vertices; }; - // Had to make these non-members to avoid accidental instantiation - // on SGI MIPSpro C++ - template - inline typename C::InEdgeList& - in_edge_list(adj_list_impl&, - typename C::vertex_descriptor v) - { - typename C::stored_vertex* sv = (typename C::stored_vertex*)v; - return sv->m_in_edges; - } - template - inline const typename C::InEdgeList& - in_edge_list(const adj_list_impl&, - typename C::vertex_descriptor v) { - typename C::stored_vertex* sv = (typename C::stored_vertex*)v; - return sv->m_in_edges; - } - // O(1) template