$include_dir="/home/hyper-archives/boost/include"; include("$include_dir/msg-header.inc") ?>
Subject: Re: [boost] [tree] Reviving the tree library
From: Joel Young (jdy_at_[hidden])
Date: 2011-05-06 13:58:10
Erik Erlandson <eerlands <at> redhat.com> writes:
> I have a few questions regarding the TR2 tree iterators
>
> 2) What is the semantic of in-order traversal for a non-binary tree?
For flexibility, there needs to be a walk that generalizes preorder,
inorder and postorder as well as handedness of the walk.
The user should be able to specify a left-side visitor, a bottom visitor (that
can be aware of how many times the bottom has been visited to deal with
non-binary trees), and a right visitor.
In addition, a traversal should be able to be either left handed or right handed.
The traversal should be able to stop after meeting some precondition and return
a reference to the node stopped at.
Finally, the traversal should be able to be started at any node in the tree.
Joel