CompactTree
|
#include <compact_tree.h>
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* () |
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.