Aleph-w  1.9
General library for algorithms and data structures
Aleph::For_Each_Postorder< 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 the traversal.
 
template<class Op >
void operator() (Node *root, Op &op) const noexcept(noexcept(op))
 
template<class Op >
void operator() (Node *root, Op &&op=Op()) const noexcept(noexcept(op))
 

Detailed Description

template<class Node>
class Aleph::For_Each_Postorder< Node >

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

Member Function Documentation

◆ operator()() [1/2]

template<class Node >
template<class Op >
void Aleph::For_Each_Postorder< 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_Postorder< Node >::operator() ( Node *  root,
Op &&  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