|
Aleph-w 7.10.0
A C++ Library for Data Structures and Algorithms
|
Generic postorder traversal of a binary tree. More...
#include <tpl_binNodeUtils.H>
Public Member Functions | |
| template<class Op > | |
| void | traverse (Node *root, Op &&op) const |
| Invoke the traversal. | |
| template<class Op > | |
| void | operator() (Node *root, Op &op) const |
See traverse(Node * root, Op && op). | |
| template<class Op > | |
| void | operator() (Node *root, Op &&op=Op()) const |
See traverse(Node * root, Op && op). | |
Static Private Member Functions | |
| template<class Op > | |
| static void | postorder (Node *root, Op &&op) |
Generic postorder traversal of a binary tree.
For_Each_Postorder traverses a binary tree in preorder. For each is node is called an operation with the following signature:
struct Op
{ void operator () (Node * p) { operation } };
Definition at line 442 of file tpl_binNodeUtils.H.
|
inline |
See traverse(Node * root, Op && op).
Definition at line 472 of file tpl_binNodeUtils.H.
|
inline |
See traverse(Node * root, Op && op).
Definition at line 465 of file tpl_binNodeUtils.H.
|
inlinestaticprivate |
|
inline |
Invoke the traversal.
Definition at line 458 of file tpl_binNodeUtils.H.
References postorder, and root().
Referenced by Aleph::for_each_postorder().