
24 Feb
2005
24 Feb
'05
6:20 p.m.
"Joao Abecasis" <jpabecasis@zmail.pt> wrote in message news:421E01EA.6020105@zmail.pt... | From the basic iterators other types of traversal are possible. In my |unfinished tree library (see my other post) the same effect would be |accomplished with: | | inorder_iterator<tree_t::tree_iterator> i = tr.root(); | preorder_iterator<tree_t::tree_iterator> i2 = tr.root(); | | This keeps the interface and the implementation of the tree cleaner. One | could also use BGL algorithms here if the tree exposes a Graph interface. you can still have your clean separation, but I would prefer to expose it as typedefs in the tree. That is going to be much more pleasent in generic code. -Thorsten