2
0
mirror of https://github.com/boostorg/graph.git synced 2026-01-31 08:12:14 +00:00

added public parent() function

[SVN r8844]
This commit is contained in:
Jeremy Siek
2001-02-01 21:27:23 +00:00
parent 6bf1049b36
commit d4d05e4578

View File

@@ -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() {