
24 Sep
2002
24 Sep
'02
12:25 p.m.
I have a BGL graph (adjacency_list). I use it to represent a tree, and so I have an internal vertex property of type enum representing the node type, ie ROOT, LEAF, INNER. Now, I would like a way to access only the leaves of a tree, preferrably through iterators. I can't think of any good way to accomplish this, except possibly by writing new iterator classes which would internally keep track of a property map and thus hide traversal of the non-leaf nodes from the code using the iterators. This seems like a cumbersome approach though, and I'm hoping there is a simpler way? Björn