You could chose to emulate such an tree using a std::multimap. Which maps
the father vertex id to the child vertices. you can also specify your own
ordering relation.
To access all children is trivial, if you want to access all grandchilds and
so own, you'd have to create a nice adapter class, that connects all
children of children ranges together.
----- Original Message -----
From: "Marc Cromme"
Dear Boost Members
I was wondering if there is an n-ary ordered tree template in boost, something like
template
class NTree which is a standard container, and a reversible container, ordered by level. That is, first element is root, next series of elements are childs of roots, next series are grandchilds of root , and so on.
This way one could parse level by level like a reversible container.
There should be the obvious member functions for inserting/deleting child nodes and subtrees.
As far as I can see, there is not such a template in boost, but the question is then:
1) can it be emulated using the grah library ??
or
2) is there already an proposal/prototype for such a thing ??
or
3) would it be interesting to include such a thing in boost ??
your's sincierely,
Marc Cromme