On Tue, 03 Sep 2002 04:54:19 +0200, Jeremy Siek wrote:
I for one would like to see trees in boost. There's several variations that would be nice
both ordered and unordered N-ary, where N is fixed at compile time, and the same for every node N-ary, where each node can have a different run-time specified number of children
I think the most useful is a rooted ordered compile-time fixed N-ary tree to start with: ordering is no great hassle and can just be neglected when you do not need it. The notion of a run-time node dependent n-ary tree is in praxis the same as a tree with nodes of arbitrary children count. How often do we really need this ?? Can we lay this out linear in memory space?? Or do we need nodes containing std::vectors of pointers to children nodes ?? Sounds ugly to me ...
Also, I'd like the tree interface to jive with the graph interface. There's a couple files in the graph library that are the start of a basic interface for trees:
boost/graph/graph_as_tree.hpp
boost/graph/tree_traits.hpp
Thanks for the tip - I take a look at it. Cheers, Marc Cromme, ph.d.