Aleph-w  1.9
General library for algorithms and data structures
Aleph::For_Each_In_Order< Node > Class Template Reference

#include <tpl_binNodeUtils.H>

Public Member Functions

template<class Op >
void traverse (Node *root, Op &op) const noexcept(noexcept(op))
 Invoke to traversal from root node.
 
template<class Op >
void operator() (Node *root, Op &op) const noexcept(noexcept(op))
 
template<class Op >
void operator() (Node *root, Op &&op) const noexcept(noexcept(op))
 

Detailed Description

template<class Node>
class Aleph::For_Each_In_Order< Node >

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 } };

Member Function Documentation

◆ operator()() [1/2]

template<class Node>
template<class Op >
void Aleph::For_Each_In_Order< Node >::operator() ( Node *  root,
Op &  op 
) const
inlinenoexcept

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

◆ operator()() [2/2]

template<class Node>
template<class Op >
void Aleph::For_Each_In_Order< Node >::operator() ( Node *  root,
Op &&  op 
) const
inlinenoexcept

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.


The documentation for this class was generated from the following file:

Leandro Rabindranath León