|
Boost : |
From: nicola (vitacolo_at_[hidden])
Date: 2006-06-23 14:53:50
Hi all,
the following is just a curiosity of mine, about which I would like to
get some comment.
On browsing a few discussions about generic tree libraries, I got the
impression that many people judge that pre-/in-/post-order iterators,
and alike, are essential in any tree class or container (concept). My
opinion is that a generic tree class (I refrain from calling it a
"container", because in my mind a tree does not necessarily model a
Container concept) should be designed much more after the BGL than after
the STL containers.
One design choice in the BGL is that there are "visitor" functions, e.g.
breadth_first_search() and depth_first_search(), but there are no
"bfs_iterator" or "dfs_iterator". What are the motivations that lead to
such choice? Might they be applied to trees as well?
As a simple example in favor of the former approach, a "BGL-like" tree
data structure would allow a user to use a std::vector as a heap (by
overloading the suitable functions).
I know that for the SoC several tree libraries have been proposed. Is
there no room or interest for other proposals any longer? Is it possible
to take a look at those proposals?
Regards
Nicola
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk