From d4d05e4578b6ee76feb5bea8ef90fccea21e2fa6 Mon Sep 17 00:00:00 2001 From: Jeremy Siek Date: Thu, 1 Feb 2001 21:27:23 +0000 Subject: [PATCH] added public parent() function [SVN r8844] --- include/boost/graph/subgraph.hpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/include/boost/graph/subgraph.hpp b/include/boost/graph/subgraph.hpp index 1089a210..bf554a69 100644 --- a/include/boost/graph/subgraph.hpp +++ b/include/boost/graph/subgraph.hpp @@ -16,8 +16,8 @@ namespace boost { struct subgraph_tag { }; // Invariants: - // if vertex u is in subgraph g, then u must be in parent[g] - // if edge e is in subgraph e, then e must be in parent[g] + // If vertex u is in subgraph g, then u must be in g.parent(). + // If edge e is in subgraph e, then e must be in g.parent(). // The Graph template parameter must have a vertex_index // and edge_index internal property. It is assumed that @@ -97,6 +97,9 @@ namespace boost { { return m_vertex_membership[u_global]; } + + // Return the parent graph. + subgraph& parent() { return *m_parent; } // Return the root graph of the subgraph tree. subgraph& root() {