2
0
mirror of https://github.com/boostorg/graph.git synced 2026-01-30 07:52:10 +00:00

fixed bug with regards to in_edge_list for undirected graphs

[SVN r22222]
This commit is contained in:
Jeremy Siek
2004-02-09 18:21:05 +00:00
parent 9b53c7b81b
commit d4e507bab8

View File

@@ -767,6 +767,24 @@ namespace boost {
}
};
// Had to make these non-members to avoid accidental instantiation
// on SGI MIPSpro C++
template <class C>
inline typename C::InEdgeList&
in_edge_list(undirected_graph_helper<C>&,
typename C::vertex_descriptor v)
{
typename C::stored_vertex* sv = (typename C::stored_vertex*)v;
return sv->m_out_edges;
}
template <class C>
inline const typename C::InEdgeList&
in_edge_list(const undirected_graph_helper<C>&,
typename C::vertex_descriptor v) {
typename C::stored_vertex* sv = (typename C::stored_vertex*)v;
return sv->m_out_edges;
}
// O(E/V)
template <class EdgeOrIter, class Config>
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 <class C>
inline typename C::InEdgeList&
in_edge_list(bidirectional_graph_helper<C>&,
typename C::vertex_descriptor v)
{
typename C::stored_vertex* sv = (typename C::stored_vertex*)v;
return sv->m_in_edges;
}
template <class C>
inline const typename C::InEdgeList&
in_edge_list(const bidirectional_graph_helper<C>&,
typename C::vertex_descriptor v) {
typename C::stored_vertex* sv = (typename C::stored_vertex*)v;
return sv->m_in_edges;
}
template <class Predicate, class Config>
inline void
remove_edge_if(Predicate pred, bidirectional_graph_helper<Config>& 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 <class D, class C, class B>
inline typename C::InEdgeList&
in_edge_list(adj_list_impl<D,C,B>&,
typename C::vertex_descriptor v)
{
typename C::stored_vertex* sv = (typename C::stored_vertex*)v;
return sv->m_in_edges;
}
template <class D, class C, class B>
inline const typename C::InEdgeList&
in_edge_list(const adj_list_impl<D,C,B>&,
typename C::vertex_descriptor v) {
typename C::stored_vertex* sv = (typename C::stored_vertex*)v;
return sv->m_in_edges;
}
// O(1)
template <class Derived, class Config, class Base>