Boost logo

Boost :

Subject: Re: [boost] [tree] Reviving the tree library
From: Cromwell Enage (sponage_at_[hidden])
Date: 2011-05-06 17:22:21


--- On Fri, 5/6/11, Rene Rivera wrote:
> On 5/5/2011 6:46 PM, Erik Erlandson wrote:
> > I have a few questions regarding the TR2 tree iterators
> >
> > 1) I would recommend a breadth-first iterator
>
> Right. There are many additional traversal algorithms
> possible. And the specification of the pre-defined ones
> is one of the week points of the current TR.
>
> > 2) What is the semantic of in-order traversal for a
> > non-binary tree?
>
> Even though it's only implied I think it's left-to-right
> in-order traversal.

What are your thoughts on a generalized depth-first iterator that also indicates whether it's currently in pre-order traversal mode, post-order traversal mode, or neither? I've found it useful for implementing scene graphs, for example.

Cromwell D. Enage


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk