CompactTree 1.1.0
Loading...
Searching...
No Matches
compact_tree::levelorder_iterator Class Reference

#include <compact_tree.h>

Inheritance diagram for compact_tree::levelorder_iterator:
Collaboration diagram for compact_tree::levelorder_iterator:

Public Types

typedef CT_NODE_T reference
typedef void pointer

Public Member Functions

 levelorder_iterator (compact_tree *const tp)
 levelorder_iterator (const CT_NODE_T root, compact_tree *const tp)
 levelorder_iterator (std::queue< CT_NODE_T > x, compact_tree *const tp)
 levelorder_iterator (const levelorder_iterator &o)
levelorder_iterator & operator= (const levelorder_iterator &o)
levelorder_iterator & operator++ ()
levelorder_iterator operator++ (int)
bool operator== (const levelorder_iterator &rhs) const
bool operator!= (const levelorder_iterator &rhs) const
CT_NODE_T operator* () const

Detailed Description

Levelorder traversal iterator. The only guarantee is that nodes will be visited in increasing order of depth (i.e., number of edges from the root). Note that the copy constructor and the post-increment it++ operator will copy the BFS queue, which is slow and uses extra memory, so avoid both when possible.


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