|
Aleph-w 7.10.0
A C++ Library for Data Structures and Algorithms
|
Generic inorder traversal of a binary tree. More...
#include <tpl_binNodeUtils.H>
Public Member Functions | |
| template<class Op > | |
| void | traverse (Node *root, Op &&op) const |
| Invoke to traversal from root node. | |
| 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) const |
See traverse(Node * root, Op && op). | |
Static Private Member Functions | |
| template<class Op > | |
| static void | for_each_inorder (Node *root, Op &&op) |
Generic inorder traversal of a binary tree.
For_Each_In_Order traverses a binary tree in order. For each is node is called an operation with the following signature:
struct Op { void operator () (Node * p) { operation } };
Definition at line 313 of file tpl_binNodeUtils.H.
|
inlinestaticprivate |
Definition at line 316 of file tpl_binNodeUtils.H.
References Aleph::For_Each_In_Order< Node >::for_each_inorder(), LLINK, RLINK, and root().
Referenced by Aleph::For_Each_In_Order< Node >::for_each_inorder(), Aleph::For_Each_In_Order< Node >::operator()(), Aleph::For_Each_In_Order< Node >::operator()(), and Aleph::For_Each_In_Order< Node >::traverse().
|
inline |
See traverse(Node * root, Op && op).
Definition at line 343 of file tpl_binNodeUtils.H.
References Aleph::For_Each_In_Order< Node >::for_each_inorder(), and root().
|
inline |
See traverse(Node * root, Op && op).
Definition at line 336 of file tpl_binNodeUtils.H.
References Aleph::For_Each_In_Order< Node >::for_each_inorder(), and root().
|
inline |
Invoke to traversal from root node.
Definition at line 329 of file tpl_binNodeUtils.H.
References Aleph::For_Each_In_Order< Node >::for_each_inorder(), and root().
Referenced by Aleph::for_each_in_order().