From 1feee2a56443e4d94fbff5e22b562003234ef007 Mon Sep 17 00:00:00 2001 From: Jeremy Siek Date: Fri, 2 Mar 2001 03:34:11 +0000 Subject: [PATCH] added a couple functions [SVN r9376] --- include/boost/graph/subgraph.hpp | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/include/boost/graph/subgraph.hpp b/include/boost/graph/subgraph.hpp index da5af26a..6dfa52d0 100644 --- a/include/boost/graph/subgraph.hpp +++ b/include/boost/graph/subgraph.hpp @@ -310,6 +310,12 @@ namespace boost { const subgraph& g) { return in_degree(u_local, g.m_graph); } + template + typename graph_traits::degree_size_type + degree(typename graph_traits::vertex_descriptor u_local, + const subgraph& g) + { return degree(u_local, g.m_graph); } + //=========================================================================== // Functions required by the AdjacencyGraph concept @@ -374,7 +380,8 @@ namespace boost { Children& c, subgraph* orig) { for (typename Children::iterator i = c.begin(); i != c.end(); ++i) - if ((*i).find_vertex(u_global).second && (*i).find_vertex(v_global).second) + if ((*i).find_vertex(u_global).second + && (*i).find_vertex(v_global).second) add_edge_recur_down(u_global, v_global, e_global, *i, orig); } @@ -741,6 +748,16 @@ namespace boost { return get_property(g.m_graph, tag); } + //=========================================================================== + // Miscellaneous Functions + + template + typename subgraph::vertex_descriptor + vertex(typename subgraph::vertices_size_type n, const subgraph& g) + { + return vertex(n, g.m_graph); + } + } // namespace boost #endif // BOOST_SUBGRAPH_HPP