CompactTree
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 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_iteratoroperator= (const levelorder_iterator &o)
 
levelorder_iteratoroperator++ ()
 
levelorder_iterator operator++ (int)
 
bool operator== (const levelorder_iterator &rhs) const
 
bool operator!= (const levelorder_iterator &rhs) const
 
CT_NODE_T operator* ()
 

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). Currently, nodes with the same depth will be visited in the order they appear in the original Newick string. 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: