Modified tree library class. More...
#include <cassert>#include <memory>#include <stdexcept>#include <iterator>#include <set>#include <queue>#include <algorithm>
Go to the source code of this file.
Classes | |
| class | tree< T, tree_node_allocator >::breadth_first_queued_iterator | 
| Breadth-first iterator, using a queue.  More... | |
| class | tree< T, tree_node_allocator >::children_iterator | 
| Iterator which traverses only the nodes which are siblings of each other.  More... | |
| class | tree< T, tree_node_allocator >::compare_nodes< StrictWeakOrdering > | 
| Comparator class for two nodes of a tree (used for sorting and searching).  More... | |
| class | tree< T, tree_node_allocator >::iterator_base | 
| Base class for iterators, only pointers stored, no traversal logic.  More... | |
| class | tree< T, tree_node_allocator >::iterator_base_less | 
| Comparator class for iterators (compares pointer values; why doesn't this work automatically?).  More... | |
| class | tree< T, tree_node_allocator >::leaf_iterator | 
| Iterator which traverses only the leaves.  More... | |
| class | tree< T, tree_node_allocator >::post_order_iterator | 
| Depth-first iterator, first accessing the children, then the node itself.  More... | |
| class | tree< T, tree_node_allocator >::pre_order_iterator | 
| Depth-first iterator, first accessing the node, then its children.  More... | |
| class | tree< T, tree_node_allocator > | 
| class | tree_node_< T > | 
| A node in the tree, combining links to other nodes as well as the actual data.  More... | |
Namespaces | |
| namespace | kp | 
Functions | |
| template<class T1 > | |
| void | kp::constructor (T1 *p) | 
| template<class T1 , class T2 > | |
| void | kp::constructor (T1 *p, T2 &val) | 
| template<class T1 > | |
| void | kp::destructor (T1 *p) | 
Modified tree library class.
The tree.hh library for C++ provides an STL-like container class for n-ary trees, templated over the data stored at the nodes. Various types of iterators are provided (post-order, pre-order, and others). Where possible the access methods are compatible with the STL or alternative algorithms are available.
Definition in file tree_new.hh.