On Apr 6, 2005, at 12:31 AM, Elvanör wrote:
Hello.
I have just been looking recently at the subgraph feature of the BGL.
If I understand correctly, in order to use it you *must* first create
a root subgraph; you can't use an existing Graph as the root and call
create_subgraph on that adjacency_list, for example.
It also seems like when you create a subgraph, it is somehow stored on
the root subgraph, since
Couriercreate_subgraph() has
a return type of subgraph<&.
As it returns a reference, I assume that
the actual object is somehow stored on the root. But I need to create
and delete lots of subgraphs on a given root graph. Creating the
subgraph is no problem; however how can I deleted them ??? I could
just leave them, of course, but that's an obvious waste of resources...
The subgraph is stored on the root, so that when edges are
added/removed anywhere in the graph the changes can ripple throughout
the graph structure. However, there's no support for deleting
subgraphs.
Is there an answer to my question? If possible, I'd also like
to learn a little bit more about the subgraph implementation (all I
can suppose from the documentation is that it is stored in some kind
of tree data-strucutre).
The only good answers are in the implementation itself :)
Doug