SyTen

◆ visit_bottom() [4/6]

template<typename T >
template<typename Func >
std::result_of<Func(Ptr)>::type syten::BinaryTree::Tree< T >::visit_bottom ( Func &&  f,
typename std::result_of< Func(Ptr)>::type  initial,
IterFirst const  dir = IterFirst::Left 
)
inline

Visits each node, starting at the left or right bottommost node.

Parameters
ffunction to call on each pointer to a node
initialinitial value of the accumulator
dirleft or right branch first?
Returns
the accumulated value from each branch and the root node.

References syten::BinaryTree::Tree< T >::r, and syten::BinaryTree::Tree< T >::visit_bottom_rec().

Referenced by syten::BinaryTree::Tree< T >::leaf().

+ Here is the call graph for this function:
+ Here is the caller graph for this function: